日期:2014-05-16  浏览次数:20884 次

新手上路,请教个问题。
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <title> New Document </title>
  <meta name="Generator" content="EditPlus">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
 </head>

 <body>
  <%
  If true Then Response.write "是数字"
  Else Response.write "不是数字"
  %>
 </body>
</html>
这段代码提示有错,为什么?
------解决方案--------------------
引用:
引用:引用:引用:缺少 end if
没有啊,if语句可以没有end if的。http://www.w3school.com.cn/vbscript/vbscript_conditionals.asp 
参看这里


你说可以不要end if  是在一行……


你那个是在一行,一行的是可以不用end if,

 但是 你上面贴的代码是多行的

另外不推荐这种写法,最好都假山 end if