if (!document.getElementsByClassName) { document.getElementsByClassName = function(className, element) { var children = (element || document).getElementsByTagName('*'); var elements = new Array(); for (var i = 0; i < children.length; i++) { var child…
//create method getElementsByClassName for document if(!document.getElementsByClassName){ document.getElementsByClassName = function(className, element){ var children = (element || document).getElementsByTagName('*'); var elements = new Array(); for…
1.复制此代码到你js代码的最前面即可 if(!document.getElementsByClassName){ document.getElementsByClassName = function(className, element){ var children = (element || document).getElementsByTagName('*'); var elements = new Array(); for (var i=0; i<children.length; i…
在代码前面加如下代码: if (!document.getElementsByClassName) { document.getElementsByClassName = function (className, element) { var children = (element || document).getElementsByTagName('*'); var elements = new Array(); for (var i = 0; i < children.length; i++…
<select> <option onclick="test('www.hao123.com')"value="www.hao123.com">hao123</option> <option on click="test('www.baidu.com')" value="www.baidu.com">baidu</option> <option on click…