Home >Web Front-end >JS Tutorial >How to use js to change the readonly attribute value of multiple inputs at one time_javascript skills

How to use js to change the readonly attribute value of multiple inputs at one time_javascript skills

WBOY
WBOYOriginal
2016-05-16 16:45:041183browse
复制代码 代码如下:

<script> <br>function doclick1(){ <br>var txtN = document.getElementsByTagName("input"); <br>for(i=0;i<txtN.length;i ){ <BR>if(txtN[i].type="text"){ <BR>txtN[i].readOnly=false; <BR>} <BR>} <BR>} <BR></script>




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