本文介绍了时间发布ASP代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我怎样才能让时间发布ASP代码?我希望在特定日期之后制作代码部分 可查看。这样做的东西,但这不是 工作正常: if now()> =" 6/24/2005"然后 Response.Write(这里是我的新html) else Response.Write(现在只是显示当前信息) 结束如果 How can I made time released ASP code? I want to make section of codeviewable after a certain date. Something to this effect, but this does notwork right:if now() >= "6/24/2005" thenResponse.Write ( "here is my new html" )elseResponse.Write ( "for now just show the current information" )end if 推荐答案 日期文字应以#分隔。以下是参考资料: http://msdn.microsoft.com/library/en...ndamentals.asp 请考虑使用ISO标准日期格式YYYYMMDD或YYYY-MM-DD。 这是一篇相关的文章: http://aspfaq.com/show.asp?id=2260 Response.Write不返回值,因此不需要 拨打电话时的括号。 Date literals should be delimited with #. Here''s a reference: http://msdn.microsoft.com/library/en...ndamentals.asp Please consider using ISO standard date formats YYYYMMDD or YYYY-MM-DD.Here''s a related article: http://aspfaq.com/show.asp?id=2260 Response.Write does not return a value, so there is no need for theparentheses when making the call. 您在自己的网站上做的是符合您的口味。 您在此提供的建议应尽可能一般。 以下代码在00:00欧洲中部切换, 当服务器在加拿大多伦多当时: <% d =#2005-04-20 18:00#''21/4 / 05 00:00 CET 如果现在> d然后 %> 切换,< br>你太迟了! <%else%> 尚未,< br>朋友! <%end if if> - Evertjan。 荷兰。 (用我的电子邮件地址替换所有带点的十字架) What you do on your own site is for your taste. What you advise here should be as general as possible. The below code switched at 00:00 Central European,while the server is in Toronto, Canada and on that time:<%d = #2005-04-20 18:00# '' 21/4/05 00:00 CETif now>d then%>Switched,<br>you''re too late!<% else %>Not yet,<br>friend!<% end if %>--Evertjan.The Netherlands.(Replace all crosses with dots in my emailaddress) 这篇关于时间发布ASP代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
11-03 00:14