Implementation Code of batch image switching in JSQL

Source: Internet
Author: User

Copy codeThe Code is as follows:
<! DOCTYPE html PUBLIC "-// W3C // dtd html 4.01 Transitional // EN" "http://www.w3.org/TR/html4/loose.dtd">
<Html>
<Head>
<Meta http-equiv = "Content-Type" content = "text/html; charset = UTF-8">
<Script type = "text/javascript" src = "../src/YESBRAIN. js"> </script>
<Script type = "text/javascript" src = "../src/JSQL. js"> </script>
<Script type = "text/javascript" src = "../src/JSQL-DOM.js"> </script>
<Title> Switch Logo Images </title>
</Head>
<Body>
<Button onClick = "switchlogos ();"> switching LOGOS </button>

<Script type = "text/javascript">
Title1 = "google ";
Title2 = "baidu ";
Logo1 = "images/google.gif ";
Logo2 = "images/baidu.gif ";
Function switchlogos (){
// Alert ('switch ');
Var tmplogo = logo1;
Var tmptitle = title1;
Logo1 = logo2;
Title1 = title2;
Logo2 = tmplogo;
Title2 = tmptitle;
("Update logolist set src = '" + logo1 + "', title = '" + title1 + "'" pai.fordom(cmd.exe cute ();
};
'Create table logolist'.fordom(cmd.exe cuteSQL ();
For (var I = 0; I <100; I ++ ){
"Insert into logolist (nodename, title, src) values ('img ', 'Google', 'images/google.gif ')" .fordom(cmd.exe cute ();
};
// ("Delete from logolist where (1 = 1)" Fig (cmd.exe cute ();

</Script>
</Body>
</Html>

The DOM element insertion Operation of JSQL is also used:
Copy codeThe Code is as follows:
'Create table logolist'.fordom(cmd.exe cuteSQL ();
For (var I = 0; I <100; I ++ ){
"Insert into logolist (nodename, title, src) values ('img ', 'Google', 'images/google.gif ')" .fordom(cmd.exe cute ();
};

Welcome!
Jsql javascript

Related Article

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.