Reputation: 943
its kind of silly question. but i dont know what mistake i am making. if any one could help.
<html>
<head>
<script type="text /vbscript">
function zips(s)
document.write(s)
end function
</script>
</head>
<body>
<script type="text/vbscript">
dim x,y
x="sushant"
<button onclick="zips(x)" id=button1 name=button1>clickme</button>
</script>
</body>
</html>
sorry i dont know how to format it. but i am no getting the desired output. any help is very much appreciated
Upvotes: 0
Views: 1259
Reputation: 498904
Your button
tag should be outside of the script
tag.
<script type="text/vbscript">
dim x,y
x="sushant"
</script>
<button onclick="zips(x)" id=button1 name=button1>clickme</button>
The button is not part of the script but part of the HTML.
Upvotes: 3