複製代碼 代碼如下: //W3C/1. Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> jQuery JavaScript 實現table 的增加和減少 <BR>$("#email").focus(function(){ <BR>var email_txt = $(this).val( ); <BR>if (email_txt == this.defaultValue) { <BR>$(this).val(""); <BR>} <BR>}) <BR>$("#email").blur (function(){ <BR>var email_txt = $(this).val(); <BR>if (email_txt == "") { <BR>$(this).val(this.defaultValue); <BR> } <BR>}) <BR> 效果預覽: