whycai

 

完整代码:

 

 1 <!DOCTYPE html>
 2 <html>
 3 <head>
 4 </head>
 5 
 6 <body>
 7 <div style="font-size:16px;float:left ;">
 8     <label class="text">内容
 9         <input  type="text" id="key" name="key"
10                placeholder="请输入"></label>
11     <button  type="button" onclick="clearText()">清空</button>
12 </div>
13 </body>
14 
15 {#地址根据实际的路径填写#}
16 <script type="text/javascript" src="xxxxx/js/jquery.min.js"></script>
17     <script type="text/javascript" language="javascript">
18         function clearText() {
19             $(\'.text input\').val(\'\');
20         }
21     </script>
22 
23 </html>

 

分类:

技术点:

相关文章:

  • 2021-11-13
  • 2021-12-09
  • 2021-09-30
  • 2021-10-16
  • 2021-11-13
  • 2021-10-29
  • 2021-11-01
猜你喜欢
  • 2021-08-03
  • 2021-08-30
  • 2021-11-02
  • 2021-11-23
  • 2021-08-02
  • 2021-11-23
  • 2021-11-17
相关资源
相似解决方案