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

JavaScriptµÄÁíÍâÁ½Öּ̳лúÖÆ

1>zInherit£º
      ËüÊÇÒ»¸ö×é¼þ£¬ÓÃÀ´¼Ì³Ð»ùÀàµÄËùÓÐÊôÐԺͷ½·¨¡£¸úÒÔǰ˵µ½µÄÔ­ÐÍÁ´Ä£Ê½·Ç³£ÀàËÆ£¬Ö»²»¹ý±ÈÔ­Ð͸ü°²È«£¬Ò²ÎÞÐ뿼ÂDzÎÊýÎÊÌâ¡£ÏÂÃæ¿´¿´zInheritµÄÓ÷¨£º
      ¸Ã×é¼þÖÐÖ»ÓÐÁ½¸ö·½·¨£ºinheritfrom() instanceof()
     function Polygon(iSides){
this.iSides = iSides;
if(typeof Polygon._initialized == "undefined"){
Polygon.prototype.getArea = function(){
return 0;
}
Polygon._initialized = true;
}
}
function Traingle(iHeight,iWidth){
Polygon.call(this,3);
this.iHeight = iHeight;
this.iWidth = iWidth;
if(typeof Traingle._initialized == "undefined"){
Traingle.inheritfrom(Polygon);
//ÉÏÐеÄЧ¹û¸úÔ­À´µÄÕâ¸ö·Ç³£ÀàËÆ
// Traingle.prototype = new Polygon();
Traingle.prototype.getArea = function(){
return 0.5*iHeight*iWidth;
}
Traingle._initialized = true;
}
}
var traingle = new Traingle(12,4);
alert(traingle.getArea());//24
    Note:ÔÚÖ´ÐÐÇ°±ØÐë¼ÓÔØzInherit.js
2>xbObjects.js
    ËüÊÇÒ»¸ö¹¦ÄܸüÇ¿´óµÄ¼Ì³Ð»úÖÆ£¬³ýÁË¿ÉÒԼ̳лùÀàµÄÊôÐԺͷ½·¨Í⣬»¹¿ÉÒÔµ÷Óø¸ÀàµÄ·½·¨£¬ÔÚÖ´ÐÐÇ°Ò³±ØÐëÔö¼Ó×é¼þxbObject.js.
 ¾ßÌåµÄ²½ÖèÈçÏ£º
   µÚÒ»²½£º×¢²áÀࣨ_classes.registerClass("sub_class","base_class") _classes.register("sub_class")£©
   µÚ¶þ²½£º¹¹Ô캯Êý£¬²¢ÔÚº¯ÊýÖж¨ÒåÀà(_classes.defineClass("class_name",prototypeFunction))
   µÚÈý²½£ºÖ´ÐÐinit£¨£©·½·¨£¬¸Ã·½·¨µÄ²ÎÊý±ØÐë¸ú¹¹Ô캯ÊýµÄ²ÎÊýÆ¥Åä
   µÚËIJ½£º¿ÉÒÔͨ¹ýparentMehtod("method_name",arguments)
   <mce:script type="text/javascript"><!--
//Polygon
_classes.registerClass("Polygon"); //1
function Polygon(iSides){ //2
_classes.defineClass("Polygon",prototypeFunction);
this.init(iSides);//³õʼ»¯PolygonµÄËùÓÐÊôÐÔ//3

function prototypeFunction(){//4
Polygon.prototype.init = function(iSides){
this.parentMethod("init");
this.iSides


Ïà¹ØÎĵµ£º

JavascriptÔõôÔÚÁ½¸ö´°ÌåÖ®¼ä´«Öµ2

Ô­ÎÄ£ºÁõÎä|JavascriptÔõôÔÚÁ½¸ö´°ÌåÖ®¼ä´«Öµ2-showModalDialog  
ǰһƪÎÄÕÂJavascriptÔõôÔÚÁ½¸ö´°ÌåÖ®¼ä´«ÖµÖн²µ½ÁËÈçºÎÀûÓÃwindow.open()·½·¨´ò¿ªÐ´°Ì壬²¢ÔÚÁ½¸ö´°ÌåÖ®¼ä´«ÖµµÄ·½·¨¡£javascriptÖл¹ÓÐÒ»¸öº¯Êýwindow.showModalDialogÒ²¿ÉÒÔ´ò¿ªÒ»¸öд°Ì壬²»¹ýËû´ò¿ªµÄÊÇÒ»¸öģ̬´°¿Ú£¬ÄÇôÈçºÎÔÚ¸¸´°Ì ......

javascriptʵÏÖ¶ÔÎļþÉÏ´«ÀàÐ͵ÄÏÞÖÆ

×¢£º http://www.java114.com/277/content4355.html
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> upload </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME ......

JavaScript ÈçºÎµ¯³öÒ»¸ö¶Ô»°¿ò´°¿Ú

//¶¨ÒåÒª´ò¿ªµÄ¶Ô»°¿òÒ³ÃæµÄµØÖ· Ò»°ãÓÃactionÌøתҪдÃ÷actionµÄµØÖ·£¬Èç¹ûÐèÒª²ÎÊý£¬ÔòÔÚºóÃæÆ´½Ó
var urlDialog = "grpBlackWhiteManageAction.do?act=choiceMessageModel&GrpBWhiteListLevel=0";
//¶¨ÒåÒªµ¯³öµÄ¶Ô»°¿òµÄģʽ£¬dialogWidth¿í£¬dialogHeight¸ß µÈµÈ
 var style = "dialogWidth=600px;dialogH ......

½â¾öFirefox ÏÂF5ºÍIEÏÂF5 ²»Ò»ÖµÄjavascript ½Å±¾.

½â¾öFirefox ÏÂF5ºÍIEÏÂF5 ²»Ò»ÖµÄjavascript ½Å±¾.
var check=function(e)
 {
  e=e||window.event;
  //alert(e.which||e.keyCode);
  if((e.which||e.keyCode)==116)
  {
   if(e.preventDefault)
   { e.preventDefault();}
&nb ......

ÓÃJavaScriptÒþ²Ø¿Ø¼þµÄ·½·¨£¨×ª£©

ÓÃJavaScriptÒþ²Ø¿Ø¼þµÄ·½·¨ÓÐÁ½ÖÖ£¬·Ö±ðÊÇͨ¹ýÉèÖÿؼþµÄstyleµÄ“display”ºÍ“visibility”ÊôÐÔ¡£µ±style.display="block"»òstyle.visibility="visible"ʱ¿Ø¼þ»ò¼û£¬µ±style.display = "none"»òstyle.visibility = "hidden"ʱ¿Ø¼þ²»¿É¼û¡£²»Í¬µÄÊÇ“display”²»µ«Òþ²Ø¿Ø¼þ£¬¶øÇÒ±»Òþ²ØµÄ¿ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ