<div class="codetitle"> <span><a style="CURSOR: pointer" data="27375" class="copybut" id="copybut27375" onclick="doCopy('code27375')"><u>复制代码</u></a></span> 代码如下:</div> <div class="codebody" id="code27375"> <br><script type="text/javascript"> <BR>$(function(){ <BR>$(":input").focus(function(){ <BR>$(this).addClass("focus"); <BR>}).blur(function(){ <BR>$(this).removeClass("focus"); <BR>}); <BR>})//这个效果第三个textarea也会添加样式 <BR></script> <br><form action="" method="post" id="regForm"> <br><fieldset> <br><legend>个人基本信息</legend> <br><div> <br><label for="username">名称:</label> <br><input id="username" type="text"> <br> </div> <br><div> <br><label for="pass">密码:</label> <br><input id="pass" type="password"> <br> </div> <br><div> <br><label for="msg">详细信息:</label> <br><textarea id="msg" rows="2" cols="20"></textarea> <br> </div> <br> </fieldset> <br> </form> <br> </div>