javascript如何检查网页元素是否包含某个特定字符串

it2022-05-09  24

function check(CheckStr) { var str; str=document.getElementById("ooo").innerHTML; if(str.indexOf(CheckStr)==-1) return false; else return ture; }

转载于:https://www.cnblogs.com/nanshouyong326/archive/2008/12/30/1365473.html


最新回复(0)