Simple javascript example |
<html>
<script language="JavaScript"> <!-- hide document.write("Welcome to my homepage!<br>");
document.write("Welcome to my homepage!<br>");
document.write("Welcome to my homepage!<br>");
// -->
|
Same as above, but with a function!! |
<html>
<script language="JavaScript"> <!-- hide function myFunction() {
myFunction();
// -->
|
How to load open a new Navigator window, with options |
<html>
<head> <script language="JavaScript"> <!-- hide function openWin2() {
// -->
<form>
</body>
|
A big page showing how to access for elements, and the onClick event |
<html>
<script language="JavaScript">
function first() { // creates a popup window with the
alert("The value of the textelement is: " +
function second() { // this function checks the state of the checkbox var myString= "The checkbox is "; // is checkbox checked or not?
// output string
// -->
<form name="myForm">
<p><br><br> <script language="JavaScript">
document.write("The background color is: ");
document.write("The text on the second button is: ");
// -->
</body>
|