|
Get the current date :
|
var date=new Date()
|
|
Convert date into time type :
|
var time=date.getTime() (1000th of second)
|
|
Convert time into date type :
|
date.setTime(time) (mm/dd/yyyy hh:mm:ss)
|
|
Get day from date :
|
date.getDay()
|
|
Get month from date :
|
date.getMonth()
|
|
Get year from date :
|
date.getYear()
|
|
Get hours from date :
|
date.getHours()
|
|
Get minutes from date :
|
date.getMinutes()
|
|
Get seconds from date :
|
date.getSeconds()
|
|
Convert date into string type :
|
string=date.toLocaleString()
|
|
Ask for a prompt :
|
answer=prompt(question_string,default_value) (= NULL if Cancel)
|
|
Open an Alert window :
|
alert(string) (Buttons: OK)
|
|
Open a Confirm window :
|
answer=confirm(string) (Buttons: OK and Cancel)
|
|
Return the width of current window :
|
screen.width
|
|
Return the height of current window :
|
screen.height
|
|
Return the number of colors :
|
screen.colorDepth (in Bytes)
|
|
Return the name of the explorer :
|
navigator.appName
|
|
Return the version of the explorer :
|
navigator.appVersion
|
|
Return the reference of the document :
|
document.referrer
|
|
Number of letters before 1st caracter :
|
string.indexOf(caracter)
|
|
Number of letters before last caracter :
|
string.lastIndexOf(caracter)
|
|
Return the value of a form input :
|
input.value
|
|
Status value of a window (link) :
|
window.status='status_appearing_in_the_lower_bar'
|
|
Return the lower integer value of real :
|
Math.floor(real)
|
|
Display a string type :
|
adr.document.write(string) (string can be any "text and HTML marks", and adr the window address)
|
|
Open a window :
|
var adr=window.open(url,"","width="+width+",height="+height+",left="+left+",top="+up)
|
|
Close the current window :
|
window.close()
|
|
Set the cursor in the form input :
|
input.focus()
|
|
Set a script action with a timeout :
|
setTimeout(script, timeout)
|