<script type="text/javascript">? $(function(){ ?$("#user").bind("blur",function(){ ?if($("#user").html==null){ ?//這里應(yīng)該做一個判斷? ? $("#formText").html("請輸入用戶名!");? ?}else{ ?$("#formText").html(" ");? ?} ? ?}), ?$("#user").bind("focus",function(){ ?$("#formText").html("");? ?});?})</script>? ? ?<span>用戶名:</span><input type="text" name="username" ?id="user" ?value="${user} " />? ? ?<span>密 ? 碼:</span><input type="password" name="password" ?id="pwd"/>我想的是 當(dāng)不聚焦,然后input輸入的內(nèi)容不為空,那個提示就沒了
新手,求指教! 關(guān)于Jquery中的一些問題
if_else_
2016-06-02 10:16:33