Implementation Code of batch image switching in jsql

Source: Internet
Author: User

CopyCode The 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

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.