Let’s take the case type="text" as an example:
By calling the Refresh method of js
Method 1
function Refresh()
{
var v=document .forms[0].elements;
for(var i=0;i{
if(v[i].type=="text")
{
v[i].value="";
}
}
}
or method two
function Refresh()
{
var v=document.getElementsByTagName("input" );
for(var i=0;i{
if(v[i].type=="text")
{
v[ i].value="";
}
}
}
Clear the value of an element by calling the refresh function
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