读书人

一个简单的VBScript返回的是False!郁闷

发布时间: 2012-02-27 10:00:22 作者: rapoo

一个简单的VBScript返回的是False!?郁闷!
<%@LANGUAGE= "VBSCRIPT " CODEPAGE= "936 "%>
<html>
<head>
<title> Function Test </title>
</head>

<body>
<%
Function TestWord(Daxiaoxie)
If Daxiaoxie > = 2 then
TestWord = "TESTWORD "
Else
TestWord = "testword "
End If
End function
Response.Write " 大写的 "& Daxiaoxie = 3 & " <br> "
Response.Write " 小写的 "& Daxiaoxie = 1 & " <br> "
%>
</body>
</html>

就这么点..返回是的 False 两个..

<html>
<head>
<title> 无标题文档 </title>
</head>

<body>
FalseFalse
</body>
</html>

超郁闷...

[解决办法]
<html>
<head>
<title> Function Test </title>
</head>

<body>
<%
Function TestWord(Daxiaoxie)
If Daxiaoxie > = 2 then
TestWord = "TESTWORD "
Else
TestWord = "testword "
End If
End function
Daxiaoxie = 3
Response.Write " 大写的 " & TestWord(Daxiaoxie) & " <br> "
Daxiaoxie = 1
Response.Write " 小写的 " & TestWord(Daxiaoxie) & " <br> "
%>
</body>
</html>
[解决办法]
TestWord函数没调用

读书人网 >ASP

热点推荐