哦!错了,服务器端不支持inputbox
应该是:
<script language="Vbscript">
dim name
name = InputBox("Please input your name:")
If (name="Lincon") then
window.location.href"localstart.asp"
Else
window.location.href="other.asp"
End If
</script>
应该改成
<script language="Vbscript" runat=server>
dim name
name = InputBox("Please input your name:")
If (name="Lincon") then
response.redirect "localstart.asp"
Else
response.redirect "other.asp"
End If
</script>
改成
<script language="Vbscript">
dim name
name = InputBox("Please input your name:")
If (name="Lincon") then
response.redirect "localstart.asp"
Else
response.redirect "other.asp"
End If
</script>
我用了huntout兄的做法,提示需要response对象.
再用wzs兄的做法提示类型不匹配.
还请TopHead兄教我第二种方法吧.
我的源程序如下:
<script language="Vbscript">
dim name
name = InputBox("Please input your name:")
If (name="Lincon") then
redirect "localstart.asp"
Else
redirect "other.asp"
End If
</script>
还请以上五位高手多指教,不胜感谢.
另外,谁能告诉我学ASP的捷径, 应看哪些书为好?