日期:2014-05-16 浏览次数:20382 次
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"> <html> <head> <title>new document</title> <script type="text/javascript"> function $(id){ return document.getElementById(id); } function check(obj){ if(obj.value != "" && obj.value == $("sdz").value){ $("shfs").value = ""; $("shfs").disabled = true; }else{ $("shfs").disabled = false; } } </script> </head> <body> <input type="text" id="sdz" onblur="$('zdz').value = this.value"> <input type="text" id="zdz" onblur="check(this)" > <input type="text" id="shfs" onfocus="check($('zdz'))"> </body> </html>