JavaScript³£ÓÃ
--------------------------------------------------------------------------------
<body>
<mce:script type="text/javascript"><!--
document.write("Èç¹ûÏÔʾÁËÕâ¶ÎÎÄ×Ö£¬ÄÇôÄúµÄä¯ÀÀÆ÷Ö§³Ö JavaScript£¡")
// --></mce:script>
<noscript>No JavaScript support!</noscript>
<p>
²»Ö§³Ö JavaScript µÄä¯ÀÀÆ÷½«ÏÔʾ noscript ÔªËØÖеÄÎı¾¡£
</p>
</body>
--------------------------------------------------------------------------------
¡·Îĵµ¶ÔÏó
[ collAll = ] object.all
[ oObject = ] object.all(vIndex [, iSubIndex])
[ oObject2 = ] object.all.item(vIndex )
collAll£ºÒ»¸ö°üº¬object¶ÔÏóÒÔÏÂËùÓÐÔªËصÄÊý×é¡£
vIndex£º¿ÉÒÔÊÇÊý×Ö»ò×Ö·û´®¡£ÆäÖУ¬×Ö·û´®¿ÉÒÔΪnameÊôÐÔ»òidÊôÐÔµÄÖµ¡£
oObject2ÓëoObjectͬ¡£
¾ÙÀý£º
<body>
<form action="" name="f" id="fid">
<input type="text" name="c" id="c1" value="c1" ><br>
<input type="text" name="c" id="c2" value="c2" ><br>
<input type="button" name="bt" value="Test" onclick="test()" ><br>
</form>
</body>
var c = document.all("c"); ·µ»ØÊý×é
˵Ã÷£ºÈç¹ûÒ³ÃæÖÐÊôÐÔname="c"µÄ¶ÔÏóÖ»ÓÐ1¸ö£¬Ôò·µ»Ø¸Ã¶ÔÏó£¬Èô´óÓÚ1¸öÔò·µ»ØÊý×é¡£
var c = document.all("c1"); ·µ»Ø¶ÔÏó
˵Ã÷£ºÈç¹ûÒ³ÃæÖÐÊôÐÔid="c"µÄ¶ÔÏóÖ»ÓÐ1¸ö£¬Ôò·µ»Ø¸Ã¶ÔÏó£¬Èô´óÓÚ1¸öÔò·µ»ØÊý×é¡£
Áí£ºÒ²¿ÉÒÔÓÃdocument.all["c"]ÕâÖÖ·½Ê½£¬Ð§¹ûÓëdocument.all("c")²î²»¶à¡£
document.all[]ÊÇ´ÓIE4¿ªÊ¼Ö§³ÖµÄ£¬Ö»ÄÜÓÃÓÚIE£¬²»·ûºÏWEB±ê×¼¡£
var c = document.f.c; ·µ»ØÊý×é
var c = document.fid.c; ·µ»Ø¶ÔÏó
var c = f.c; ·µ»ØÊý×é
var c = f.c1; ·µ»Ø¶ÔÏó
var c = fid.c; ·µ»ØÊý×é
var c = fid.c1; ·µ»Ø¶ÔÏó
--------------------------------------------------------------------------------
¡·±í¸ñ¶ÔÏó
[ oColl = ] object.cells
[ oObject = ] object.cells(vIndex [, iSubIndex])
oColl£ºÒ»¸ö°üº¬tdºÍthÔªËصĵ¥Ôª¸ñµÄÊý×é¡£Èç¹ûobjectÊÇtable£¬ÔòÊý×é°üº¬ËùÓÐtableÖеıí¸ñÔªËØ£»ÈôΪtr£¬ÔòÊý×é½ö°üº¬trÕâÒ»Ðеıí¸ñÔªËØÄÚÈÝ¡£
ͬÀí£¬ÈôΪobje
Ïà¹ØÎĵµ£º
<script type="text/javas
cript">
var docEle = function() {
return document.getElementById(arguments[0]) || false;
}
function openNewDiv(_id){
var m = "mask";
if (docEle(_id)) document.body.removeChild(docEle(_i ......
·½·¨£º string.replace(new RegExp(oldString,"gm"),newString))
gm g=global, m=multiLine£¬´óÖÂÉÏ·½·¨¾ÍÊÇÕâÑùµÄ£¬¿ÉÒÔʵÏÖÌ滻ȫ²¿Ö¸¶¨×Ö´®
ÁíÒ»¸ö¼òµ¥µÄÑéÖ¤JSµÄ·½·¨£º
ÔÚä¯ÀÀÆ÷µØÖ·À¸ÊäÈë
javascript:alert("abcabcabc".replace(new RegExp("a","gm"),"ad&quo ......
ÔÚ×öÍøÕ¾µÄʱºò£¬ÎÒÃǾ³£ÐèÒª¶Ô³ß´ç³¬±êµÄͼƬ½øÐÐËõ·Å¡£
ÓÉÓÚä¯ÀÀÆ÷µÄ²îÒ죬ÓÐЩ´úÂëijЩä¯ÀÀÆ÷¹¤×÷²»Õý³£¡£
¾¹ýÑо¿µÃµ½ÁËÒÔϵĴúÂ룬Ëü¿ÉÒÔÔÚIE6,IE8,FireFoxÖÐÍêÃÀµØ°´±ÈÀýËõ·ÅͼƬ¶ø²»Ê§Õæ¡£
//¸Ä±äͼƬ´óС
function resizepic(o)
{
var maxwidth=550; //¶¨Òå×î´ó¿í¶È
var maxheight=800;&nbs ......
ÔÚ JS(JavaScript) ²Ù×÷cookies±È½Ï¸´ÔÓ£¬ÔÚ ASP ÀïÃæÎÒÃÇÖ»ÐèÒªÖªµÀ cookie µÄÃû³Æ¡¢cookie µÄÖµ¾ÍÐÐÁË£¬¶ø JS ÀïÃ棬ÎÒÃÇÃæ¶ÔµÄÊÇ cookie µÄ×Ö·û´®£¬Äã×Ô¼º±àдÕâ¸ö×Ö·û´®Ð´Èë¿Í»§¶Ë£¬È»ºó×Ô¼º½âÎöÕâ¸ö×Ö·û´®¡£
¡¡¡¡Ò»¡¢´Óд cookie ˵Æð¡£
var the_date = new Date("December 31, 2020");
var expiresDate ......
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 ......