发布网友 发布时间:2022-05-01 12:16
共1个回答
热心网友 时间:2023-10-11 14:20
1js脚本:
2
3function TextClear()
4{
5var mm = document.getElementsByTagName("input").length ;
6for(var i=0;i<mm;i++)
7{
8var dd = document.getElementsByTagName("input").item(i);
9if(dd.type == "text")
10{
11dd.value="";
12}
13}
14}
15</script>
16
17
18vbscript脚本:
19<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
20<HTML>
21<HEAD>
22<TITLE> New Document </TITLE>
23<META NAME="Generator" CONTENT="EditPlus">
24<META NAME="Author" CONTENT="">
25<META NAME="Keywords" CONTENT="">
26<META NAME="Description" CONTENT="">
27</HEAD>
28
29<BODY>
30<FORM METHOD=POST ACTION="" name="Form1">
31<INPUT TYPE="text" NAME="a" value="sdfsf">
32<INPUT TYPE="text" NAME="a1" value="sdfsf">
33<INPUT TYPE="text" NAME="a2" value="sdfsf">
34<INPUT TYPE="text" NAME="a3" value="sdfsf">
35<INPUT TYPE="text" NAME="a4" value="sdfsf">
36<INPUT TYPE="text" NAME="a5" value="sdfsf">
37<SELECT NAME="cc"></SELECT>
38<INPUT TYPE="button" value=button name=button1 onclick="allcheck_click()">
39</FORM>
40</BODY>
41</HTML>
42<SCRIPT LANGUAGE="vbScript">
43<!--
44function allcheck_click()
45 For Each Obj In Form1
46 //alert(Obj.type)
47 if Obj.type = "text" then
48 set myTextBOx = Obj
49 myTextBOx.value = Empty
50 end if
51 next
end function
//-->
</SCRIPT>
热心网友 时间:2023-10-11 14:20
1js脚本:
2
3function TextClear()
4{
5var mm = document.getElementsByTagName("input").length ;
6for(var i=0;i<mm;i++)
7{
8var dd = document.getElementsByTagName("input").item(i);
9if(dd.type == "text")
10{
11dd.value="";
12}
13}
14}
15</script>
16
17
18vbscript脚本:
19<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
20<HTML>
21<HEAD>
22<TITLE> New Document </TITLE>
23<META NAME="Generator" CONTENT="EditPlus">
24<META NAME="Author" CONTENT="">
25<META NAME="Keywords" CONTENT="">
26<META NAME="Description" CONTENT="">
27</HEAD>
28
29<BODY>
30<FORM METHOD=POST ACTION="" name="Form1">
31<INPUT TYPE="text" NAME="a" value="sdfsf">
32<INPUT TYPE="text" NAME="a1" value="sdfsf">
33<INPUT TYPE="text" NAME="a2" value="sdfsf">
34<INPUT TYPE="text" NAME="a3" value="sdfsf">
35<INPUT TYPE="text" NAME="a4" value="sdfsf">
36<INPUT TYPE="text" NAME="a5" value="sdfsf">
37<SELECT NAME="cc"></SELECT>
38<INPUT TYPE="button" value=button name=button1 onclick="allcheck_click()">
39</FORM>
40</BODY>
41</HTML>
42<SCRIPT LANGUAGE="vbScript">
43<!--
44function allcheck_click()
45 For Each Obj In Form1
46 //alert(Obj.type)
47 if Obj.type = "text" then
48 set myTextBOx = Obj
49 myTextBOx.value = Empty
50 end if
51 next
end function
//-->
</SCRIPT>