jquery清除input type为password?
phpcn_u251
phpcn_u251 2017-03-10 14:11:32
0
2
953

我试了.val("")和.attr("value","")的方法,但没有成功,对象获取上没问题的,因为用.attr成功改变了边框颜色,求助??

phpcn_u251
phpcn_u251

reply all(2)
数据分析师

jquery clear input type to password? -PHP Chinese website Q&A-jquery clears input type to password? -PHP Chinese website Q&A

Let’s take a look and learn.

阿神

可以试下

<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>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!