So, what now? Let's add a prompt box to ask our name and then spit out a personalized Hello message.
You see in the prompt box thing, there is a part that says "Hey! What's your name?" is fairly self explanatory. But you may feel doubt to think what's the empty double quotes ("") for? That's for the default string. Put something in the quotes (like your name or anything) and re-run it to see the effect.
What's an event? An event is when something happens. Such as a mouse over, mouse click, page loading, etc.
So we can put some simple alert box pop up when the page loads using the onLoad event handler in the body tag.
Each time you try the answer will be same 65. Want to know why? Find it by yourself.
These scripts are a basic level primer, and not entirely your own work. They are taken from http://www.htmliseasy.com/index.html, and there is also a "pay to see the rest" branch at http://www.pagetutor.com/index.html
Slight changes to the occasional words may throw off google searches, but does not disguise where you ripped the tutorial from...
Code 4: (logical math game)
Your modification is buggy though. For example, first you declare a variable and then prompt that same variable (you overwrite "firstnumber")
So, rahid, could you please modify your post and quote the copied parts ?Remember that if you don't do that, your topic will directly go the the "spam and junk" folder and you should loose a lot of credits.------------------------Edit :Obviously you did not find time enough for the quoting job, so I did it for you.Please, next time do not forget to do it by yourself. Else some mods around here could think that you are deliberately posting copied material.
Cool tutorial.Never knew that is possible. "Not litteraly"
|VIEW DESKTOP VERSION||REGISTER||GET FREE HOSTING|