📄 subject_66204.htm
字号:
<p>
序号:66204 发表者:hemef 发表日期:2003-12-23 10:32:29
<br>主题:菜鸟紧急求球(dreamweaver)
<br>内容:怎么样在我点击submit按纽后,能执行我写的程序,并且输出结果,在我不刷新时,结果能在此页面保持不变呢? <BR><BR><BR>(在网页里面,做了一个form1, <BR>form1中有两个文本textfield,一个用于输入,一个用于输出 <BR><BR>我用的是vb脚本vbscript <BR><BR>一个submit按纽,程序如下 <BR><BR><script language="VBScript"> <BR><!-- <BR>sub submit_onclick() <BR>dim theform <BR>set theform=document.form1 <BR>if len(theform.text1.value)<>"3" then <BR> msgbox"请您输入一个3数字" <BR> exit sub <BR> end if <BR>if theform.text1.value>"123" then <BR>msgbox"哈哈,不错" <BR>theform.text2.value="还好吧" <BR>else msgbox"惨,没有" <BR> end if <BR>end if <BR>end sub <BR>--> <BR></script> <BR><BR>结果我执行的时候,老是出一下结果,就马上跳转到一个无效页面“网页无法显示) <BR>
<br><a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p>
<hr size=1>
<blockquote><p>
<font color=red>答案被接受</font><br>回复者:LOVEYUAN 回复日期:2003-12-23 11:40:38
<br>内容:我帮你修改了一下,有空看看<BR><BR><HTML><BR><HEAD><BR><title>TestDream</title><BR><script language="VBScript"><BR><!-- <BR>sub submit_onclick() <BR>dim theform <BR>set theform=document.form1<BR>alert("Test")<BR>if len(theform.text1.value)<>"3" then <BR> msgbox"???入一个3数字" <BR> exit sub <BR> end if <BR>if theform.text1.value>"123" then <BR>msgbox"哈哈,不?"<BR>document.getElementById("text2").value = "?好"<BR>else msgbox"惨,没有" <BR>end if <BR>end sub <BR>--> <BR></script><BR><BR> <BR></HEAD><BR><BR><body ><BR> <form NAME="form1" method="post"><BR> <INPUT type="text" id = "text1" value ="ge"><BR> <INPUT id = "text2" value ="Me"><BR> <INPUT type="button" value="Submit" onclick = "submit_onclick()"><BR> </form><BR> </body><BR></HTML>
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:hemef 回复日期:2003-12-23 14:20:05
<br>内容:多谢楼上的,我还想问一下<BR><BR>为什么我写的老是在点击弹出的框后出一下结果,就直接刷新,以至于text2中显示的内容不能保持?<BR>2003-12-23 14:31:52
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -