Imitation station: Weave dream, background HTML load jquery parsing XML?

Source: Internet
Author: User
XML code:


jquery Code:
Main program
Class (' App ', {

Use: ' Countdown ', Ready:true,index:function () {this.listdata=[];    This.kjlistdata=[];    This.todaykjlistdata=[]; This.loadaopencode ();},loadaopencode:function () {this.ajax ({url: "/aopencode.xml", Retry:1, Cach E:false, end:function (data, i) {this.qxml ('//rownow ', data.xml, function (o, i) {this.li            Stdata[this.listdata.length] = O.items;             });            This.qxml ('//row ', data.xml, function (o, i) {this.kjlistdata[this.kjlistdata.length] = O.items;            }); This.qxml ('//rowtoday ', data.xml, function (o, i) {this.todaykjlistdata[this.todaykjlistdata.length] = o.it            Ems             });                                    This.qxml ('//row ', data.xml, function (o, i) {if (o.items.gid== "03") {                THIS.SHOWKJ (o.items,data.date); } if (o.items.gid== ") {if (o.items.trycode== "" | |                    o.items.trycode==undefined) {$ ("#12sjh"). HTML ("");                        }else{var trycodes = O.items.trycode.replaceall (', ', ');                    $ ("#12sjh"). HTML ("Consumer list:" +trycodes);                     }                                    }            }); }    });},

This.get ("#dlt_code"). html (' ' +code[0].split (', '). Join (' ') + ' ' + ' "+code[1].split (', '). Join (' ');

This.countdown (This.get ("#dlt_countdown"), This.get ("#dlt_kj_countdown"), Nextendtime,d,awardtime,o.gid);            }else if (o.gid== ') {this.get ("#sfc_pid"). HTML (O.PID);        This.get ("#sfc_pools"). HTML (o.pools); This.get ("#sfc_kjdate"). HTML (o.auditdate==undefined| |            o.auditdate== '? O.awardtime.substr (0,10): O.auditdate.substr (0,10));            This.get ("#sfc_code"). HTML (O.code.split (', '). Join ('));        var aginfo = O.ginfo.split (",");        var aninfo = O.ninfo.split (",");        var rjinfo = This.getginfo ("81");    if (aginfo.length>1) This.countdown (This.get ("#sfc_countdown"), "', This.getnextendtime (O.gid), D, '", o.gid);            }else if (o.gid== ') {this.get ("#sd_pid"). HTML (O.PID);        This.get ("#sd_kjdate"). HTML (O.AWARDTIME.SUBSTR (0,10)); $ ("#qlc_code"). HTML ('' +code[0].split (', '). Join ('')+''+'' +code[1].split (', '). Join ('')+''); }    },

Original HTML code:



金钱榜  2015-12-13  2015641期开榜:每天12:30123             消费榜:3 2 1




The HTML code you want to modify:


【这里】  【这里】  【这里】期开榜:每天12:30【这里】             【这里】【这里】




Would you please help me with prawns? Give me a clue!

Reply content:

XML code:


jquery Code:
Main program
Class (' App ', {

Use: ' Countdown ', Ready:true,index:function () {this.listdata=[];    This.kjlistdata=[];    This.todaykjlistdata=[]; This.loadaopencode ();},loadaopencode:function () {this.ajax ({url: "/aopencode.xml", Retry:1, Cach E:false, end:function (data, i) {this.qxml ('//rownow ', data.xml, function (o, i) {this.li            Stdata[this.listdata.length] = O.items;             });            This.qxml ('//row ', data.xml, function (o, i) {this.kjlistdata[this.kjlistdata.length] = O.items;            }); This.qxml ('//rowtoday ', data.xml, function (o, i) {this.todaykjlistdata[this.todaykjlistdata.length] = o.it            Ems             });                                    This.qxml ('//row ', data.xml, function (o, i) {if (o.items.gid== "03") {                THIS.SHOWKJ (o.items,data.date); } if (o.items.gid== ") {if (o.items.trycode== "" | |                    o.items.trycode==undefined) {$ ("#12sjh"). HTML ("");                        }else{var trycodes = O.items.trycode.replaceall (', ', ');                    $ ("#12sjh"). HTML ("Consumer list:" +trycodes);                     }                                    }            }); }    });},

This.get ("#dlt_code"). html (' ' +code[0].split (', '). Join (' ') + ' ' + ' "+code[1].split (', '). Join (' ');

This.countdown (This.get ("#dlt_countdown"), This.get ("#dlt_kj_countdown"), Nextendtime,d,awardtime,o.gid);            }else if (o.gid== ') {this.get ("#sfc_pid"). HTML (O.PID);        This.get ("#sfc_pools"). HTML (o.pools); This.get ("#sfc_kjdate"). HTML (o.auditdate==undefined| |            o.auditdate== '? O.awardtime.substr (0,10): O.auditdate.substr (0,10));            This.get ("#sfc_code"). HTML (O.code.split (', '). Join ('));        var aginfo = O.ginfo.split (",");        var aninfo = O.ninfo.split (",");        var rjinfo = This.getginfo ("81");    if (aginfo.length>1) This.countdown (This.get ("#sfc_countdown"), "', This.getnextendtime (O.gid), D, '", o.gid);            }else if (o.gid== ') {this.get ("#sd_pid"). HTML (O.PID);        This.get ("#sd_kjdate"). HTML (O.AWARDTIME.SUBSTR (0,10)); $ ("#qlc_code"). HTML ('' +code[0].split (', '). Join ('')+''+'' +code[1].split (', '). Join ('')+''); }    },

Original HTML code:



金钱榜  2015-12-13  2015641期开榜:每天12:30123             消费榜:3 2 1




The HTML code you want to modify:


【这里】  【这里】  【这里】期开榜:每天12:30【这里】             【这里】【这里】




Would you please help me with prawns? Give me a clue!

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.