Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

JavaScript ÕýÔò±í´ïʽ¾­µäʵÀýÕûÀí

 <html>
<head>
<title>test javaScript</title>
//cssÉèÖÃͼÏñµÄ͸Ã÷¶È
<mce:style><!--
img
{
filter:alpha(opacity=10)
}
--></mce:style><style mce_bogus="1">img
{
filter:alpha(opacity=10)
}</style>
<mce:script type="text/javascript"><!--
function abort(){
alert("abort is invoked!");
}
function testConfirm(){
result=confirm("testConirm is completed");
if(result)
alert("you choose continue..."+result);
else
alert("you choose stop..."+result);
}
function testPrompt(){
var x=prompt("Enter a number between 0 and 10:","")
try{
if(x>10)
throw "Err1";
else if(x<0)
throw "Err2";
else
alert("the result is:"+x);
} catch(er){
if(er=="Err1")
alert("Error! The value is too high");
if(er == "Err2")
alert("Error! The value is too low") ;
}
}
function getWeekday(str){
//You will receive a different greeting based
//on what day it is. Note that Sunday=0,
//Monday=1, Tuesday=2, etc.
var d=new Date(str)
theDay=d.getDay()
switch (theDay)
{
case 1:
alert("Monday");
break;
case 2:
alert("Tuesday");
break;
case 3:
alert("Wednesday");
break;
case 4:
alert("Thursday");
break;
case 5:
alert("Finally Friday")
break;
case 6:
alert("Super Saturday")
break;
case 0:
alert("Sleepy Sunday")
break;
default:
alert("I'm looking forward to this weeke nd!");
}
}
function add(a,b){
c=a+b;
return c;
}
function addResult(){
a=prompt("please input a number","0");
b=prompt("please input another number","0");
alert("the result of "+a+","+b+"is:"+add(a,b));
}
function welcome(){
//alert("Welcome to my Homepage!");
}
function goodbye(){
//alert("goodbye!");
}
fu


Ïà¹ØÎĵµ£º

javascriptµ¯³öÒ»¸öÖ¸¶¨´óСµÄ´°¿Ú


Java´úÂë
<script language="JavaScript">   
function js_show(per_id)   
{   
   window.open('/weihu/person/viewResume.jsp?perID='+per_id, 'resume', 'resizable=yes,menuBar=0,toolBar=0,scrollbars=yes,width=800,height=600,left ......

JavaScript xmlTree

<!doctype html public "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title> JavaScript: xm ......

javascript »ñÈ¡¹ö¶¯Ìõ¸ß¶È+³£ÓÃjsÒ³Ãæ¿í¶ÈÓë¸ß¶È

/********************
 * È¡´°¿Ú¹ö¶¯Ìõ¸ß¶È 
 ******************/
function getScrollTop()
{
    var scrollTop=0;
    if(document.documentElement&&document.documentElement.scrollTop)
    {
        ......

¡¾×ª¡¿Javascriptº¯ÊýÖд«µÝ´ø¿Õ¸ñµÄ²ÎÊý

Javascriptº¯ÊýÖд«µÝ´ø¿Õ¸ñµÄ²ÎÊý
       ͨ³£ÔÚÒ³ÃæÖÐÒªÈÃijЩÄÚÈݵã»÷ºó²úÉúµã»÷ʼþ£¨·ÇÒ³ÃæÌø×ª£©¶¼»áʹÓÃonclick£¬µ«ÊÇÕâÑù²»ÊÊÓÚÐèÒª´«µÝ²ÎÊýµÄÇé¿ö£¬ÓÚÊÇд³ÉÖ±½Óµ÷ÓÃJavascriptº¯ÊýµÄ·½Ê½£º<a href=javascript:somefunction(args)>content</a>¡£×¢Ò⣬ÕâôдÊÇÓÐÎÊÌâµ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ