开发者

Passing Vbscript to Javascript

开发者 https://www.devze.com 2022-12-19 01:14 出处:网络
I\'m using VbScript to get the current hour from the server, then want to pass it to a JavaScript function as shown below. Can you please advise as to the correct way to write this.

I'm using VbScript to get the current hour from the server, then want to pass it to a JavaScript function as shown below. Can you please advise as to the correct way to write this.

<%
Dim currentHour
currentHour = Hour(Now)
%>

<script type="text/javascript">
$(function() {     开发者_如何学编程  
var dd = 0
var dsc = ('"&currentHour&"');
if (dsc > 4) {
dd = dd + 1; // go one day in the future
}
</script>

Thanks


var dsc = ('<%= currentHour %>');
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号