文章詳情頁
jquery清除input type為password?
瀏覽:145日期:2022-06-24 17:25:33
問題描述
我試了.val("")和.attr("value","")的方法,但沒有成功,對象獲取上沒問題的,因為用.attr成功改變了邊框顏色,求助??
問題解答
回答1:jquery清除input type為password?-PHP中文網問答-jquery清除input type為password?-PHP中文網問答
圍觀一下哦,學習一下。
回答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>
標簽:
word
相關文章:
1. java - Spring MVC怎么實現提交表單后跳轉?2. javascript - table列過多,有什么插件可以提供列排序和選擇顯示列的功能3. java - input file類型上傳了一個文件,想計算一下上傳文件的大小?4. python - 為什么正常輸出中文沒有亂碼,zip函數之后出現中文編程unicode編碼的問題,我是遍歷輸出的啊。5. javascript - windows下如何使用babel,遇到了困惑6. html - vue項目中用到了elementUI問題7. JavaScript事件8. showpassword里的this 是什么意思?代表哪個元素9. 對mysql某個字段監控的功能10. javascript - js中向下取整
排行榜
