文章詳情頁
jquery清除input type為password?
瀏覽:147日期:2022-06-24 17:25:33
問題描述
我試了.val("")和.attr("value","")的方法,但沒有成功,對(duì)象獲取上沒問題的,因?yàn)橛?attr成功改變了邊框顏色,求助??
問題解答
回答1:jquery清除input type為password?-PHP中文網(wǎng)問答-jquery清除input type為password?-PHP中文網(wǎng)問答
圍觀一下哦,學(xué)習(xí)一下。
回答2:可以試下
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <script src="jquery-2.1.1.min.js"></script> </head> <body ><input type="password" id="txtPwd" value="fsdafs"><script type="text/javascript">$(document).ready(function(){$("#txtPwd").attr("value","");});</script> </body></html>
標(biāo)簽:
word
相關(guān)文章:
1. java - spring boot 如何打包成asp.net core 那種獨(dú)立應(yīng)用?2. java - 在用戶不登錄的情況下,用戶如何添加保存到購物車?3. javascript - webpack 分割加載代碼后,react 界面不更新4. 安全性測(cè)試 - nodejs中如何防m(xù)ySQL注入5. html - eclipse 標(biāo)簽錯(cuò)誤6. javascript - nginx反向代理靜態(tài)資源403錯(cuò)誤?7. python文檔怎么查看?8. javascript - 關(guān)于apply()與call()的問題9. datetime - Python如何獲取當(dāng)前時(shí)間10. android - SwipeRefreshLayout5.0以下不兼容
排行榜

熱門標(biāo)簽