Wednesday, May 19, 2010

Javascript Syntax

Javascript Tutorial
http://www.tizag.com/javascriptT/javascriptsyntax.php

document.write("something something");

window.location = "http://...";

function prompter() {
   var reply = prompt("what's your name?", "");
   alert("Nice to see you " +reply+"!");
}

window.print();

function delayer() {
   window.location="../xxxx.php";
}

body onload="setTimeout('delayer()', 5000)"

window.open("http://...", "name of window", "status =1, height=300, width=300, resizable = 0");

if(elem.value.length ==0) {
   elem.focus();
}

var numericExpression = /^[0-9[+$/;
if(elem.value.match(numericExpression)) {
}

javascript void 0
News Flash
because alert() returns null value


Set myNum Please


indexof
var aURL = "http://www.tizag.com/";
var aPosition = aURL.indexOf("www");
document.write("The position of www = " + aPosition);


Javascript Tutorial 2
http://home.cogeco.ca/~ve3ll/jstutor0.htm

Good Resource
JavaFile.com
http://www.javafile.com/

JavaScript.net
http://www.java-scripts.net/

No comments:

Post a Comment