0

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

1 Answer 1

3

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.