Javascript| crash
By understanding some of the examples below and applying them to your web, you soon become a javascipt.
Example (i), adding the current time on the page
< script language= ' JavaScript ' >
Tdy=new Date ();
document.write (' Current time: ', tdy.gethours ());
document.write (': ', tdy.getminutes ());
document.write (': ', Tdy.getseconds ());
Example (ii), the date on which the page was added to the document last modified
< script language= ' JavaScript ' >
document.write (' last edited date of this page: ');
document.write (document.lastmodified)
Example (iii), displaying Mobile information in the window's Status prompt window
(1) before the body
< script language= ' JavaScript ' >
var msg= ' This is a state line scrolling display of the Javascipt program, interested comrades, can paste! '
var i=1
function Scroll ()
{
Mess=msg.substring (i,msg.length) + ' +msg.substring (0,i)
Window.status=mess
i++;
if (i>=msg.length) I=1;
settimeout (' scroll () ', 200);
}
(2) in the body tag:
Through the above two steps can be completed.
Example (iv), provide forward, back function
< form >
< input type= ' button ' value= ' <-'
> three page
Example (eight), getting browser properties
Navigator.appcodename=undefinednavigator.appname=microsoft Internet explorernavigator.appversion=4.0 (compatible; MSIE 5.0; Windows 98; Digext) navigator.appagent=undefined