按钮变灰的例子大全
<scriptlanguage="javascript">
functionsubmitonce(theform)
{
if(document.all||document.getElementById)
{
for(i=0;i<theform.length;i++)
{
vartempobj=theform.elements[i]
if(tempobj.type.toLowerCase()=="image"||tempobj.type.toLowerCase()=="reset")
tempobj.disabled=true
alert("dd");
}
}
}
</script>
<formid="form1"name="form1"method="post"action=""onsubmit="javascript:submitonce(this);">
<label></label>
<label>
<inputtype="text"name="textfield"/>
</label>
<inputtype="image"name="imageField"src="btn.jpg"/>
</form>
functionsubmitonce(theform)
{
if(document.all||document.getElementById)
{
for(i=0;i<theform.length;i++)
{
vartempobj=theform.elements[i]
if(tempobj.type.toLowerCase()=="image"||tempobj.type.toLowerCase()=="reset")
tempobj.disabled=true
alert("dd");
}
}
}
</script>
<formid="form1"name="form1"method="post"action=""onsubmit="javascript:submitonce(this);">
<label></label>
<label>
<inputtype="text"name="textfield"/>
</label>
<inputtype="image"name="imageField"src="btn.jpg"/>
</form>
本文地址:http://www.45fan.com/dnjc/71371.html