【发布时间】:2017-05-07 11:47:21
【问题描述】:
function functiont(){
var a = document.getElementById("q").value;
var b = a.toLowerCase();
var x = b.search("news"||"headline"||"headlines");//is this possible?
if(x != -1){
$("p").text("here are the results");
} else{
$("p").text("sorry");
}
是否可能发生以下事情,或者我必须创建更多变量并搜索所有关键字?
【问题讨论】:
标签: javascript