Quantcast
Channel: Javascript | Syntaxxx
Viewing all articles
Browse latest Browse all 6

Interactive Web Page Functions with JavaScript

$
0
0
With JavaScript code, you can make your Web pages interactive. By adding small amounts of scripting code to your pages, you can detect and respond to various types of user events. In this tutorial we will work through the basics of using JavaScript – don’t worry if you have no programming experience as the syntax is very simple. At the end of the tutorial you should have a foundation in JavaScript on which you can continually build. Including Scripts in your Pages We will use the demo page we built in Building Websites with HTML and Styling Web Pages with CSS, adding JavaScript functionality to the existing code: <!DOCTYPE html> <html> <head> <title>My Page</title> <style type="text/css"> /*style declarations*/ h1 { background-color:#CCCCFF; color:#330000; padding:2%; } .note { font-style:italic; } #conclusion { color:#000033; } div p { color:#006600; } div { float:left; } a:link { color:#330000; } a:visited { color:#003333; } a:hover { color:#000033; } a:active { color:#330033; } a:link, a:visited, a:hover, a:active { text-decoration:none; font-weight:bold; } </style> </head> <body> <!--page content--> <h1>My Page</h1> <div> You can validate your Web page code using the <a href="http://validator.w3.org/">W3C Markup Validation Service</a>. </div> <p class="note"> This is some text. </p> <div class="note"> This some more […]

Viewing all articles
Browse latest Browse all 6

Trending Articles