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

Javascript Óï·¨½²½â

1.delete ÔËËã·û
¶ÔÏóɾ³ýÒ»¸öÊôÐÔ£¬»òÊý×éÖÐɾ³ýÒ»¸öÔªËØ¡£½«ÎÞÓõÄÄÚÈÝɾ³ýÒÔ½ÚÊ¡¿Õ¼ä¡£
delete expression
example:
  var person = new Object();
  person.sex = "male";
  alert(person.sex);
  delete person.sex;
  alert(person.sex);
2. ‘,' ÔËËã·û
  var a = 2;
  var b = 3;
  var c = (a++,b++,a+b);
  alert(c); // 7
3.for each ...in,±éÀú¶ÔÏóÊôÐÔµÄÖµ»òÊý×éµÄÔªËØ
//´´½¨¶ÔÏó ÓÃ{}´´½¨Ò»¸öжÔÏ󣬲¢ÓÃÖ¸¶¨µÄ¼üºÍÖµ³õʼ»¯¸Ã¶ÔÏó.
var myObject = {hisName:"javascript",age:11,belonging:"Mozilla"};
for each ( var item in myObject){
   document.write(item);
}
4. withÓï¾ä , ¿ÉÒÔ·½±ãµØÒýÓÃij¸öÌض¨¶ÔÏóµÄ·½·¨ºÍÊôÐÔ
Óï·¨¸ñʽ£º
with(object){
  statement(s);
}
 example:
   var rightNow = new Date();
   with(rightNow){
      document.write(getDay());
   }
  »ò
   var rightNow = new Date();
   document.write(rightNow.getDay());
with£ºÊ¡ÂÔÁËrightNow¡£
5¡£functionÄäÃûº¯Êý£¬ÕâÖÖº¯Êý½«Ò»¶Î“º¯ÊýÎı¾”´æ´¢ÔÚÒ»¸ö±äÁ¿ÖÐ.Ö»ÄÜÔÚÃüÃûÖ®ºó£¬²Å¿ÉʹÓÃ.
Óï·¨:
    var myFunc = function(arg_1,arg_2,arg_3,....,arg_n){
           //Ö´ÐÐÓï¾ä
           return  "һЩÊý¾Ý»ò±äÁ¿";
    }
º¯ÊýÎı¾Ò²¿É×÷Ϊº¯Êý»ò·½·¨µÄ²ÎÊý
var yourname = "zhoubc";
afunc(function(){document.write(yourname);},200);
6.Object Àà
¹¹Ô췽ʽ
  1.var obj_object = new Person(parameter);
       function Person(parameter){
      }
   2.var obj_object = {ÊôÐÔÃû£ºÊôÐÔÖµ,...ÊôÐÔÃû:ÊôÐÔÖµ}
»ùÀà
´´½¨ÀàµÄʵÀý
var person = new Object();
person.sex = "male";
person.age = 28;
person.birthday = new Date(1970,0,1);
»ò
var person = {sex:"male",age:28,birthday:new Date(1970,0,1)};
´òÓ¡
for(var i in person){
  document.write(person[i]);
}


Ïà¹ØÎĵµ£º

JavaScript ×Ö·û´®×ª»»Êý×Ö

·½·¨Ö÷ÒªÓÐÈýÖÖ
ת»»º¯Êý¡¢Ç¿ÖÆÀàÐÍת»»¡¢ÀûÓÃjs±äÁ¿ÈõÀàÐÍת»»¡£
1. ת»»º¯Êý
jsÌṩÁËparseInt()ºÍparseFloat()Á½¸öת»»º¯Êý¡£Ç°Õß°Ñֵת»»³ÉÕûÊý£¬ºóÕß°Ñֵת»»³É¸¡µãÊý¡£Ö»ÓжÔStringÀàÐ͵÷ÓÃÕâЩ·½·¨£¬ÕâÁ½¸öº¯Êý²ÅÄÜÕýÈ·ÔËÐУ»¶ÔÆäËûÀàÐÍ·µ»ØµÄ¶¼ÊÇNaN(Not a Number)¡£
ÔÚÅжÏ×Ö·û´®ÊÇ·ñÊÇÊý×Öֵǰ£¬parseInt()ºÍ ......

ÓÃAcrobat JavaScript¹Ø±ÕPDF

function openCheck()
{
if (!this.external)
{
app.alert("Acrobat¤Ç¤Ï実ÐФǤ­¤Þ¤»¤ó");
this.closeDoc(true);
// var myDoc = event.target;
// myDoc.closeDoc(true);
}
}
openCheck();
 
ÐèҪעÒâµÄÊÇ:
1. ÉÏÊöµÄsourceÖ»ÄÜÔÚPDF ÓÃAcrobat Reader´ò¿ªÊ±²ÅÆð×÷ÓÃ,
ÈçÓÃIEµÈ´ò¿ªÊ±»á±¨¡¸NotSu ......

javascriptʵÏÖÕû¸öÒ³ÃæµÄ±³¾°ÑÕÉ«½¥±ä

Link:http://topic.csdn.net/u/20100317/15/687e21bc-40f3-4f0e-bc22-5f2a32ceb1a3.html?seed=1664090183&r=63989333#r_63989333
<HTML>
<head>
<title>sample</title>
<mce:script language="JavaScript"><!--
var c="FFFFFF";
window.onload=function (){
setInterval(s ......

asp.netÒ³ÃæÖж¯Ì¬µØÌí¼Ójavascript½Å±¾

×î½üµÄÏîÄ¿¿ª·¢ÖÐ Óöµ½Ò»Ð©ÐèÒª¸ù¾Ý¾ßÌåÇé¿ö¶¯Ì¬Ìí¼ÓjavaScript½Å±¾£¬È»ºóÖ´Ðнű¾ ÓÚÊÇÊÕ¼¯ÁËһϣº
1 ÔڿؼþµÄ°ó¶¨Ê¼þÖÐÌí¼Ó½Å±¾ È磺ÔÚgridview¿Ø¼þµÄrowdatabindʼþÖпÉÒÔʵÏÖ Ö¸ÕëµÄÑ¡ÖÐÐв»Í¬É«ÏÔʾ ¿ÉÌí¼Ó½Å±¾
  protected void gvEngineerRepairState_RowDataBound(object sender, GridViewRowEventArgs e ......

JavaScript³£ÓÃ

--------------------------------------------------------------------------------
<body>
<mce:script type="text/javascript"><!--
document.write("Èç¹ûÏÔʾÁËÕâ¶ÎÎÄ×Ö£¬ÄÇôÄúµÄä¯ÀÀÆ÷Ö§³Ö JavaScript£¡")
// --></mce:script>
<noscript>No JavaScript support!</noscript&g ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ