我想實現這一點,如果「clientpsseabq
」字符串包含在變量Var_words
然後等於true
,否則false
。我只是不知道我需要使用什麼方法或功能?jQuery有/包含文字
var Var_words = "https://www.go.me/outputsearchs/clientpsseabq"
if (Var_words contains string "`clientpsseabq`"){
return true;
}else{
return false;
}
如果有人能幫助我,我該如何完成此任務?
感謝您的回答, 'indexof'應該是'indexOf',否則它不起作用。 – olo 2013-04-22 20:33:54
所以應該,謝謝。我一定是匆匆打錯了 – Bojangles 2013-04-22 21:12:49