ASP代码问题,高手进

来源:百度知道 编辑:UC知道 时间:2024/06/17 13:38:45
<input type="submit" name="ok" value="提 交" <%if (yhm="" and ykft="0") or ztcz<>"1" then response.write"disabled"%>

代码是这样的 原本是如果不登陆的话 提交按扭是灰色的
但是我想修改成 不登陆的时候 提交按扭不但是灰色的 而且按扭上的文字是 请登陆后发表``请问怎么做

刚才错了,现在OK:
<input type="submit" name="ok" value="提 交">
<%if (yhm="" and ykft="0") or ztcz<>"1" then
response.write ("<script>document.getElementById('ok').value='请登陆后发表';
document.getElementById('ok').disabled=true;</script>")
end if
%>

<input type="submit" name="ok" <%
if (yhm="" and ykft="0") or ztcz<>"1" then response.write "value='请登陆'" & " disabled"
else
response.write "value='提交'"
end if
%>

给你容易理解的~~
但是代码比较多
<%if (yhm="" and ykft="0") or ztcz<>"1" then %>
<input type="submit" value = "请登录后发表" disabled = "disabled">
<%else%>
<input type="submit" value = "