<div class="codetitle"> <span><a style="CURSOR: pointer" data="68780" class="copybut" id="copybut68780" onclick="doCopy('code68780')"><u>複製程式碼</u></a></span>程式碼如下:</div> <div class="codebody" id="code68780"> <br><input type="button" value="1"> <br><br> <br> <br> <br><br> <br> <br> <br><br> <br> <br> <br> <br>var items=""; <br>jQuery(function(){ <br>$("input:button"). each(function(index){ <br>$(this).mouseover(function(){ <br>if(items.indexOf ($('input').eq(index).val())==-1 ){ <br>items =$('input').eq(index).val()<br>$(' input:text').val(items) <br>} <br>}) <br> }) <br>}) <br>; <br> </div>