Jump to content
Sign in to follow this  
atomic

Macam Mana Nak Convert Vbscript To Javascript

Recommended Posts

Salam otai putera,
nak minta tolong sapa yang mahir javascript,
dah penat google, tapi tak berjaya juga..

ni coding HTML+vbscript:
[quote]
<html>
<head><title>test</title></head>
<body><form method=post><center><input type="button" value="test" onClick="test1()"></center></form></body>
</html>

<script Language="vbscript">

sub test1()
txtStDt = "01.12.2012"
txtDt1 = Split(txtStDt,".")

txtEndDt = "15.12.2012"
txtDt2 = Split(txtEndDt, ".")

jum = DateDiff("d", DateSerial(txtDt1(2),txtDt1(1),txtDt1(0)) , DateSerial(txtDt2(2),txtDt2(1),txtDt2(0)))
alert (jum+1)
end sub

</script>
[/quote]

harap ada yang sudi tolong...
thanks

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...