0
我已经从IBM Worklight 6.1源下载了FormBasedAuthentication Project样本。在该示例中,挑战处理机正在检查字符串j_security_check,要检查的字符串的代码是,当查询字符串时,jquery搜索索引返回-1
var indicatorIdx = response.responseText.search('j_security_check');
其中响应是从服务器发送的JSON对象,responseText的是的一个键入该JSON对象。
我很清楚样本和一切的流程。但是我需要知道在响应中找到字符串时返回-1的原因,并且在没有字符串时返回responseText的长度。
什么是'response.responseText' – Krishna
尝试response.responseText.search(/ j_security_check/i);我在想可能是个案问题 – Kishorevarma
好吧,我会尽快更新。 – sasi