Posted by: Millie Patel on: December 5, 2009
You can use JavaScript code to redirect user to a page you want. For instance, when a user tries points his/her address bar to http://mywebsite.com, you can have that page automatically redirected to http://www.mywebsite.com using only one line of JavaScript code! All you need to do is to paste the following code in the <head> [...]
Posted by: Millie Patel on: November 24, 2009
You can use JavaScript commands with the onClick parameter in the input tags of an html form. Wow! That sounds like a complicated line eh? Lol…so it very easy to have the background color of a page changed on the click of a button. Just read the script below – it’s fairly easy to understand: [...]
Posted by: Millie Patel on: November 8, 2009
This is a very simple one. JavaScript has inbuilt functions that you just include in your code. See the snippet below: <html> <title>Time & Date Display</title> <head> <script language = “JavaScript”> var today = new Date() document.write(today); </script> </head> <body> Displaying Time Using JavaScript </body> </html> That’s just about it. You declare a variable called [...]
Posted by: Millie Patel on: October 27, 2009
On my previous post about how to display alert messages, you’ll see that the messages are specified in quotes within the script. What if you wanted to display user-generated data on the alerts which pop up? How would you do that? You have to first display a form through which you will collect some information. [...]
Recent Comments