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