如果条件不在传统的ASP工作 [英] If condition not working in classic ASP

查看:161
本文介绍了如果条件不在传统的ASP工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新来的传统的ASP。有什么不对低于code:如果条件错误,不明白这一点。请帮助。

 <选择NAME =优先级的风格=WIDTH:200像素ID =优先级>
  <期权价值='0'<%= IF(条件),然后在选择到底%> 0℃; /选项>
  <期权价值='1'<%= IF(条件),然后在选择到底%> 1 LT; /选项>
  <期权价值='2'<%= IF(条件),然后在选择到底%> 2'; /选项>
  <期权价值='3'<%= IF(条件),然后在选择到底%> 3'; /选项>
< /选择>


解决方案

应该是:

 <%如果条件再​​回复于(选中)%GT;

有关更多信息请看这里:

HTTP://www.$c$cfixer.com/tutorials/If_then_else。 ASP

I am new to classic ASP. What is wrong with the code below: If condition error, don't get it. Please help.

<select NAME="Priority" style="WIDTH:200px"  Id="Priority">
  <option value='0' <%= if(condition) then "selected" end%> 0 </option>
  <option value='1' <%= if(condition) then "selected" end%> 1 </option>
  <option value='2' <%= if(condition) then "selected" end%> 2 </option>
  <option value='3' <%= if(condition) then "selected" end%> 3 </option>
</select>

解决方案

Should be :

<% if condition then response.write("selected") %>

For more info see here:

http://www.codefixer.com/tutorials/If_then_else.asp

这篇关于如果条件不在传统的ASP工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆