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