ÓÐÒ»¸öÑ»·ÔÚIEÉÏÃæ´´½¨Ãæ
for(var iIndex=0;iIndex<100;iIndex++){
var pPoints=getRandPolygon();
var strPoints=pPoints.join(",");
var poly=new Polygon(strPoints,"transparent", 0,0,"transparent");
var pBound =new Polyline(strPoints,"#ff0000", 1,0.7,1);
_MapApp.addOverlay(poly);
var strMsg= " ³¤¶È:"+poly.getLength()+",Ãæ»ý:"+poly.getArea();
poly.data = strMsg ;
poly.boundry = pBound ;
poly.addListener("mouseover",function(e){showtip(poly);});
poly.addListener("mouseout",function(){htm();});
}
Ϊʲôѻ·ÍêÁË ÒÔºóÊó±êmouseover ʵÌåÉÏshowtip Ö´ÐеͼÊÇ×îºóÒ»¸öpolyµÄÄÚÈÝ????
ÄãÕâ¸öÊÇÔÚÒ»¸öÑ»·Öи³ÖµµÄ£¬ ºóÃæµÄ°ÑÇ°ÃæµÄ¸ø¸²¸ÇÁË
try[
code=JScript]poly.addListener("mouseover",function(e){showtip(poly);});
poly.addListener("mouseout",function(){htm();});
------------
(function(){poly.addListener("mouseover",function(e){showtip(poly);});
poly.addListener("mouseout",function(){htm();});
})();[/code]
ÒýÓà ±Õ°ü¾µäÎÊÌâ¡£¡£¡£ JScript code poly.addListener("mouseover",function(e){showtip(poly);}); //¸ÄΪ poly.addListener("mouseover",function(p){ return function(e){
ÎÒÔÚºǫ́µ÷ÓÃJavaScriptµÄʱºò£¬ËûÊÇÔÚºǫ́°ÑʼþµÄ´úÂëÖ´ÐÐÒ»´ÎºóÔÚÖ´ÐÐJavaScript·½·¨ ÓÐʲô°ì·¨ ÔÚÖ´ÐÐJavaScript·½·¨µÄʱºòͣס£¬ÔÚÖ´ÐкóÃæµÄ´úÂë ²»Ì«Ã÷°×°¡£¬ËµÇå³þµã°É ¾ÍÊÇÖ´Ðкǫ́´úÂëµÄʱºò ......
ÈçºÎʵÏÖµ±Êó±êÐüÍ£¿Ø¼þÉÏʱ£¬³öÏָÿؼþµÄβ²¿ÏÔʾ¶ÔÓ¦µÄ²ã£¬Êó±êÒÆ¶¯µ½¸Ã²ãÉϽøÐÐÏàÓ¦µÄ²Ù×÷£¬µ±Êó±êÒÆ³ýʱ£¨²»ÔڿؼþÉÏÒ²²»ÔÚ²ãÉÏ£©²ãÒþ²Ø£¬ http://topic.csdn.net/u/20090830/23/5e5ded07-7216-46c2-9712- ......
ÈçºÎʵÏÖµ±Êó±êÐüÍ£¿Ø¼þÉÏʱ£¬³öÏָÿؼþµÄβ²¿ÏÔʾ¶ÔÓ¦µÄ²ã£¬Êó±êÒÆ¶¯µ½¸Ã²ãÉϽøÐÐÏàÓ¦µÄ²Ù×÷£¬µ±Êó±êÒÆ³ýʱ£¨²»ÔڿؼþÉÏÒ²²»ÔÚ²ãÉÏ£©²ãÒþ²Ø£¬ HTML code: <html> <head> <meta http-equiv= ......
Èý¸öÊýx,y,z ±È´óС.. var x,y,z,t; if (x>y) {t=x;x=y;y=t;} //½»»»x,yµÄÖµ if(x>z) {t=z;z=x;x=t;}//½»»»x,zµÄÖµ if(y>z) {t=y;y=z;z=t;}//½»»»z,yµÄÖµ ÕâÊÇ ......
ÇóÒ»¸öjavascript½Å±¾.. µ±µã»÷Õâ¸ö<a>Ìí¼Ó¸½½ü</a>Á´½Óʱ¾Í»áÌí¼Ó¶àÒ»ÐÐÉÏ´«¿òºÍ°´Å¥,ºÍ×îºóÒ»¸öÅԱ߻áÏÔʾ"È¡Ïû"µÄÁ´½Ó,µã»÷Õâ¸öÈ¡Ïû¾Í»áÈ¥µô×îºóÒ»ÐÐ,Ò»¸öÕâ¸ö½Å±¾Ôõôд?Íò·Öлл.. Ò ......