<div class="codetitle"> <span><a style="CURSOR: pointer" data="21793" class="copybut" id="copybut21793" onclick="doCopy('code21793')"><u>复制代码</u></a></span> 代码如下:</div> <div class="codebody" id="code21793"> <br><script type="text/javascript"> <BR>Array.prototype.indexOf = function (str) { <BR>for (var i = 0; i < this.length; i++) { <BR>if (str == this[i]) { <BR>return i; <BR>} <BR>} <BR>return -1; <BR>} <BR></script> <br> </div>