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

ѧϰÓÃJavaScript»­Ò»¸öЦÁ³


<mce:script type="text/javascript" src="../jquery-1.2.3-intellisense.js" mce_src="jquery-1.2.3-intellisense.js"></mce:script>
<mce:script type="text/javascript"><!--
$(function() {
dayuan(200, 500, 200, 270, -90);
setTimeout(" dayuan(50, 420, 150, 180, 0);", 5000);
setTimeout(" dayuan(50, 590, 150, 180, 0);", 9000);
setTimeout(" dayuan(50, 500, 250, 0, -180);", 13000);

}
)
function dayuan(r,x,y,a,c) { //r Ô²°ë¾¶,x Ô²Ðĵĺá×ø±ê,a Æðʼ½Ç¶È,y Ô²ÐÄ×Ý×ø±ê,c ÖÕµã×ø±ê
var div = document.getElementById("div1");
var xs = setInterval(function test() {
var b = (Math.PI * (a)) / 180; //½Ç¶È»»³É»¡¶È
a = a - 1; //ÿһ´Î°´Ò»¶ÈµÝ¼õ
div.style.top = eval(y - r * Math.sin(b)) + "px"; //ÉèÖÃеÄ×ø±ê
div.style.left = eval(x + r * Math.cos(b)) + "px";
var off = $("#div1").offset(); //»ñȡеÄ×ø±ê
$("body").append("<div id='div" + off.left + off.top + "' class=\"te\"></div>"); //Ìí¼ÓÔ²µÄÿһ¸öµã
var divx = document.getElementById("div" + off.left + off.top);
divx.style.left = off.left+"px"; //ÉèÖÃÔ²µÄÿһ¸öµãµÄ×ø±ê
divx.style.top = off.top+"px";
// alert($("#div" + off.left + off.top).offset().left+" "+off.left);
if (a == c) {
clearInterval(xs);
}
}, 10);
}




// --></mce:script>

#div1
{
width:5px;
height:5px;
background-color:Black;
position:absolute;
top:100px;
left:50px;
overflow:hidden;
}
.te
{
position:absolute;
width:5px;
height:5px;
background-color:#ff0000;
overflow:hidden;
}

html´úÂë
<div id="div1"></div>


Ïà¹ØÎĵµ£º

JavascriptÖÐ×î³£ÓõÄ55¸ö¾­µä¼¼ÇÉ

1. oncontextmenu="window.event.returnValue=false" ½«³¹µ×ÆÁ±ÎÊó±êÓÒ¼ü
<table border oncontextmenu=return(false)><td>no</table> ¿ÉÓÃÓÚTable
2. <body onselectstart="return false"> È¡Ïûѡȡ¡¢·ÀÖ¹¸´ÖÆ
3. onpaste="return false" ²»×¼Õ³Ìù
4. oncopy="return false;" oncut="return f ......

дµÄµÚÒ»¸ö½ÏÓÐÒâÒåJavascript³ÌÐò

<!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=utf-8" />
<title>javascript</t ......

javascript´´½¨Êý×é

ÔÚJavaScriptÖÐûÓжàάÊý×éµÄ¸ÅÄî
µ«ÊÇ¿ÉÒÔÄ£ÄâʵÏÖ
1ά
//1 ²»ÄÜÈ·¶¨Êý×élengthµÄÇé¿öÏ£¬ÏÈÉùÃ÷Ò»¸öÊý×éÃû£¬È»ºóÔÙÖð¸ö¸³Öµ¡£
var tArray=new Array();
tArray[0]='A';
tArray[1]='2';
//2 ÖªµÀÈ·ÇеÄlength£¬´´½¨Êý×é
var tArray=new Array(10);
//3 ´´½¨Êý×éµÄͬʱ²¢¸³Öµ
var tArray=new Array('A','2','3', ......

javascript Öг£ÓõÄ55¸ö¾­µä¼¼ÇÉ

1. oncontextmenu="window.event.returnValue=false" ½«³¹µ×ÆÁ±ÎÊó±êÓÒ¼ü
<table border oncontextmenu=return(false)> <td>no </table> ¿ÉÓÃÓÚTable
2. <body onselectstart="return false"> È¡Ïûѡȡ¡¢·ÀÖ¹¸´ÖÆ
3. onpaste="return false" ²»×¼Õ³Ìù
4. oncopy="return false;" oncut="re ......

$wnd and $doc Calling native JavaScript with JSNI

$wnd and $doc Calling native JavaScript with JSNI
$wnd ÊÇʲô£¿
GWT provides the $wnd and $doc variables to refer to the window and document objects
GWTʹÓÃͨ¹ýJava Native methodʹÓÃËü£¬ÉùÃ÷Ò»¸önative·½·¨£¬½«º¬ÓÐJavaScriptµÄ·½·¨Ìå×¢ÊÍ¡£±àÒëÆ÷½«×¢ÊÍ¿éÄÚµÄÄÚÈÝÖð×ÖÊä³ö£¬Ê¹Ö®Óë±àÒë²úÉúµÄJavaScriptÕûº ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ