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
Ïà¹ØÎĵµ£º
ÔÚ×öÍøÕ¾µÄʱºò£¬ÎÒÃǾ³£ÐèÒª¶Ô³ß´ç³¬±êµÄͼƬ½øÐÐËõ·Å¡£
ÓÉÓÚä¯ÀÀÆ÷µÄ²îÒ죬ÓÐЩ´úÂëijЩä¯ÀÀÆ÷¹¤×÷²»Õý³£¡£
¾¹ýÑо¿µÃµ½ÁËÒÔϵĴúÂ룬Ëü¿ÉÒÔÔÚIE6,IE8,FireFoxÖÐÍêÃÀµØ°´±ÈÀýËõ·ÅͼƬ¶ø²»Ê§Õæ¡£
//¸Ä±äͼƬ´óС
function resizepic(o)
{
var maxwidth=550; //¶¨Òå×î´ó¿í¶È
var maxheight=800;&nbs ......
<mce:script type="text/javascript"><!--
function SetCookie(name,value,expire) {
var exp = new Date();
exp.setTime(exp.getTime() + expire);
document.cookie = name + "="+ escape (value) + ";expires=" + exp.toGMTString();
} ......
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 ......
from http://niunan.javaeye.com/blog/248256
Page.ClientScript.RegisterStartupScript(Page.GetType(),"message", "<mce:script language='javascript' defer>alert('ÑéÖ¤ÂëÊäÈë´íÎó£¡');</mce:script>"); ......
// JavaScript ½Å±¾£¬½âÎöÐÍÓïÑÔ
//
var ABCD = function(){
var pub = {};
var pri = {};
pri.name = "myhere";
pri.age = 23;
//var ABCDE;
pub.setName = function( newName){
pri.name = newName;
};
// ÕâÀï pub.getName ±»¸³ÖµÎªÒ»¸öº¯Êý£¬¾ÍÊǶ¨ÒåÒ»¸öº¯Êý
// Õâ¸öº¯Êý²¢Ã»ÓÐÔËÐУ¬Õâ¸öº¯Êý ......