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

JavaScript Access´úÂë²Î¿¼

///ÏÂÃæÊǶÔAccessµÄÁ´½Ó
function getCountfromDB() {
    //ÒÔµ±Ç°Ò³ÃæÎļþΪ»ù´¡£¬ÕÒµ½ÎļþËùÔڵľø¶Ô·¾¶¡£
    var filePath = location.href.substring(0, location.href.indexOf("Cnt.htm"));
    var path = filePath + "MyData.mdb";
    //È¥µô×Ö·û´®ÖÐ×îÇ°ÃæµÄ"files://"Õâ8¸ö×Ö·û¡£
    path = path.substring(8);
    var updateCnt = 0;

    //Éú³É²éѯºÍ¸üÐÂÓõÄsqlÓï¾ä¡£
    var sqlSelCnt = "SELECT COUNT from [COUNT] WHERE ID = 'count'";
    var sqlUpdCnt = "UPDATE [COUNT] SET [COUNT] = '";

    //½¨Á¢Á¬½Ó£¬²¢Éú³ÉÏà¹Ø×Ö·û´®
    var con = new ActiveXObject("ADODB.Connection");
    con.Provider = "Microsoft.Jet.OLEDB.4.0";
    con.ConnectionString = "Data Source=" + path;
    con.open;
    //rs¼Ç¼±íµÄ½¨Á¢
    var rs = new ActiveXObject("ADODB.Recordset");
    rs.open(sqlSelCnt, con);
    while (!rs.eof) {
        var cnt = rs.Fields("COUNT");
        document.write(cnt);
        //½«È¡µÃ½á¹û¼Ó1ºó¸üÐÂÊý¾Ý¿â¡£
        updateCnt = cnt * 1 + 1;
        rs.moveNext;
    }
    rs.close();
    rs = null;

    sqlUpdCnt = sqlUpdCnt + updateCnt + "'";
    con.execute(sqlUpdCnt);

    con.close();
    con = null;
}
 //ÏÂÃæÊÇÓëÎı¾½¨Á¢ÁªÏµ
function getCountfromTxt() {
    var filePath = location.href.substring(0, location.href.indexOf("Cnt.htm"));
    var path = filePath + "count.txt";
    path = path.substring(8);
    var nextCnt = 0;

&


Ïà¹ØÎĵµ£º

JavaScript ÔÚ±¾´°¿Ú´ò¿ªÍøÒ³

<html>
<head>
<mce:script type="text/javascript"><!--
function aaa()
{
alert("oh no");
window.location="http://community.csdn.net/";
}

// --></mce:script>
</head>
<body onload = aaa();>
< ......

Îò͸Javascript(×ªÔØ)

Òý×Ó
    ±à³ÌÊÀ½çÀïÖ»´æÔÚÁ½ÖÖ»ù±¾ÔªËØ£¬Ò»¸öÊÇÊý¾Ý£¬Ò»¸öÊÇ´úÂë¡£±à³ÌÊÀ½ç¾ÍÊÇÔÚÊý¾ÝºÍ´úÂëǧ˿ÍòÂÆµÄ¾À²øÖгÊÏÖ³öÎÞÏÞµÄÉú»úºÍ»îÁ¦¡£
    Êý¾ÝÌìÉú¾ÍÊÇÎľ²µÄ£¬×ÜÏë±£³Ö×Ô¼º¹ÌÓеı¾É«£»¶ø´úÂëÈ´ÌìÉú»îÆÃ£¬×ÜÏë¸Ä±äÕâ¸öÊÀ½ç¡£
 
  
Äã¿´£¬Êý¾Ý´úÂë¼äµÄ¹ØÏµÓëÎï ......

javascript => ShowModalDialogº¯ÊýµÄ¹¦ÄÜ

ShowModalDialogº¯ÊýµÄ¹¦ÄÜ£º

´ò¿ªÒ»¸ö×Ó´°¿Ú£¬²¢ÇÒ¿ÉÓ븸´°¿ÚÏ໥´«µÝÊý¾Ý£¬ËüÓëwindow.openµÄ×î´óÇø±ð¾ÍÔÚÓÚÓÉShowModalDialog´ò¿ª×Ó´°¿Úºó£¬¸¸´°¿Ú½«²»ÄÜ
²Ù×÷¡£
ʹÓ÷½·¨£º
vReturnValue = window.showModalDialog(sURL [,
vArguments] [, sFeatures])
²ÎÊý˵Ã÷£º
sURL

±ØÑ¡²ÎÊý£¬ÀàÐÍ£º×Ö·û´ ......

javascript¿ØÖÆÒ³Ãæ±íµ¥Öظ´Ìá½»

// PageLoadʼþ
var onloadMethod = window.onload;
window.onload = window_Load;
function window_Load() {
var i;
var item;
// È«²¿Á¬½ÓµÄʼþ
for (i = 0; i < document.links.length; i ++) {
item = document.links[i]
Object.Aspect.around(item, "onclick", checkLoading);
}
// È«²¿°´Å ......

javascriptʼþϵͳµÄ·¢Õ¹Ê·2

×Û¹ÛÒ»¸öϵͳµÄ·¢Õ¹£¬ÎÞ·ÇÊÇ·¢ÏÖÒ»¸öÎÊÌâ¾Í°ÑËü¶ÀÁ¢³öÀ´½â¾öµô£¬Òò´ËËüµÄËùÓÐÄ£¿é£¨»òÕß·ÖÖ§£©ÆäʵÕë¶Ô¶ÀÁ¢µÄÎÊÌ⣬ÕâÑùÎÒÃǶÔÕâЩÎÊÌâÈôÓÐʲô¸üºÃµÄ½â¾ö·½·¨£¬Ìæ»»ÏàÓ¦µÄÄ£¿é±ãÊÇ£¬Òª²»´úÂë»ìÔÓÔÚÒ»Æðû·¨¿´ÁË¡£ÉÏÒ»²¿·Ö¾ÍÌáµ½ÁË£¬attachEventµÄʼþÁжӳöÁËЩÎÊÌ⣬ÎÒÃÇÒªÊÖ¶¯¹¹½¨ÁжÓÁË¡£ËùνÁжӾÍÊÇÓÐÏÈÓкóµÄÎÊÌâ£¬Ò ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ