标签:style blog color os ar div sp c log
var arr = ["白色", "黑色", "红色", "粉色"]; var sel = "黑色"; if (arr.toString().indexOf(sel) > -1) { alert("true"); }
//可以判断出黑色在arr数组中
标签:style blog color os ar div sp c log
原文地址:http://www.cnblogs.com/holyson/p/3990789.html