Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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Öг£ÓõÄevent¶ÔÏó

JavascriptµÄEvent¶ÔÏóÓÃÀ´ÃèÊöJavascriptµÄʼþ£¬ËüÖ÷Òª×÷ÓÃÓÚIE4ºÍNN4ÒÔºóµÄ¸÷¸öä¯ÀÀÆ÷°æ±¾ÖС£
Event´ú±íʼþ״̬£¬Èçʼþ·¢ÉúµÄÔªËØ£¬¼üÅÌ״̬£¬Êó±êλÖúÍÊó±ê°´Å¥×´Ì¬¡£Ò»µ©Ê¼þ·¢Éú,±ã»áÉú³ÉEvent¶ÔÏó£¬Èçµ¥»÷Ò»¸ö°´Å¥£¬ä¯ÀÀÆ÷µÄÄÚ´æÖоͲúÉúÏàÓ¦µÄ event¶ÔÏó¡£
IE¶ÔʼþµÄÒýÓÃ
ÔÚIE4ÒÔÉÏ°æ±¾ÖУ¬event¶ÔÏó×÷Î ......

ÄÇЩÏà¼ûºÞÍíµÄ JavaScript ¼¼ÇÉ

from http://news.csdn.net/a/20100424/218105.html
JavaScript µÄ³É¹¦ÈÃÈ˽ò½òÀÖµÀ£¬Îª Web ÍøÒ³±àд JavaScript ´úÂëÒѾ­ÊÇËùÓÐ Web Éè¼ÆʦµÄ»ù±¾¹¦£¬ÕâÃÅÓÐȤµÄÓïÑÔÔ̲Ø×ÅÐí¶à²»ÎªÈËÊìÖªµÄ¶«Î÷£¬¼´Ê¹¶àÄêµÄ JavaScript ³ÌÐòÔ±£¬Ò²Î´ÄÜÍêÈ«³Ô͸¡£±¾ÎÄ´Ó7¸ö·½Ãæ½²Êö JavaScript ÖÐÄÇЩÄã²»ºÜÊìÖªµ«·Ç³£ÊµÓõļ¼ÇÉ¡£ ......

JavaScriptÖÐ×Ö·û´®Ïà¼ÓÐÔÄÜ

    ÔÚJavaScriptÖÐ×Ö·û´®×éºÏÏà¼Ó£¬´ó¼ÒÒ»°ãÖ±½ÓÓÃ+Æ´½ÓÆðÀ´.ÀýÈç:
for(i=0; i<len; i++){
  if(zdname != ""){
  zdname += "#" + trNode.children.item(i).getAttribute("busPath");
 }else{
  zdname = trNode.children.item(i).getAttribute("busPath");
  ......

ʹÓÃrubyÓëMS AccessÊý¾Ý¿â½»»¥

ruby³£¹æ·ÃÎÊaccessÊý¾Ý¿âµÄ·½·¨Ó¦¸ÃÊÇʹÓÃDBI¿â
£º
require 'dbi'

DBI.connect("DBI:ADO:Provider=Microsoft.Jet.OLEDB.4.0;Data Source=db.mdb;")

¿ÉÊÇ
¼òµ¥³¢ÊÔÖ®ºóûÄܳɹ¦£¬ÌáʾÕÒ²»µ½Çý¶¯Æ÷ADO,ÀÁµÃÔÙÊÔ£¬ËìÕÒÆäËû·½·¨¡£
Ò»·¬ËÑË÷Ö®ºó£¬·¢ÏÖ¿ÉÒÔÓÃWIN32OLEÀ´·ÃÎÊaccess,дһ¸ö¼òµ¥µÄÀà°ü×°Ö®: ......

javascriptÖÐÊý×éÔªËØɾ³ý

var arr=['a','b','c'];   
¡¡¡¡ÈôҪɾ³ýÆäÖеÄ'b',ÓÐÁ½ÖÖ·½·¨£º  
¡¡¡¡1.delete·½·¨:delete arr[1]   
¡¡¡¡ÕâÖÖ·½Ê½Êý×鳤¶È²»±ä,´Ëʱarr[1]±äΪundefinedÁË,µ«ÊÇÒ²Óкô¦Ô­À´Êý×éµÄË÷ÒýÒ²±£³Ö²»±ä,´ËʱҪ±éÀúÊý×éÔªËØ¿ÉÒÔ²ÅÓà  
¡¡¡¡for(index in arr)& ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ