Jump to content

Can someone


zachary

Recommended Posts

Can someone rewrite this code for me so it will pop up on load notclick the button?

<html><head><script type="text/javascript">function disp_prompt(){var name=prompt("Please enter your name","")if (name!=null && name!=""){document.write("Hello " + name + "! How are you today?")}}</script></head><body><form><input type="button" onclick="disp_prompt()" value="Display a prompt box"></form></body></html>
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...