Home  >  Article  >  Web Front-end  >  jquery implementation method for assigning values ​​to all input type=text controls

jquery implementation method for assigning values ​​to all input type=text controls

高洛峰
高洛峰Original
2017-02-11 17:01:561453browse

As shown below:

function resetData() {
   $("input[type=text]").each(
   function() {
   $(this).attr("value","");
   }
   );
 }

The above jquery implementation method for assigning values ​​to all input type=text controls is all the content shared by the editor. , I hope it can give you a reference, and I also hope that everyone will support the PHP Chinese website.

For more jquery implementation methods for all input type=text controls, please pay attention to the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn