Copy Code code as follows:
<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" "HTTP://WWW.W3.ORG/TR/HTML4/LOOSE.DTD" >
<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>
<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 + ""). Fordom (). Execute ();
};
' CREATE Table Logolist '. Fordom (). ExecuteSQL ();
for (Var i=0;i<100;i++) {
"INSERT into Logolist (NODENAME,TITLE,SRC) VALUES (' img ', ' Google ', ' images/google.gif ')". Fordom (). Execute ();
};
("Delete from Logolist where (1=1)"). Fordom (). Execute ();
</script>
</body>
It also uses the Jsql DOM element insert operation:
Copy Code code as follows:
' CREATE Table Logolist '. Fordom (). ExecuteSQL ();
for (Var i=0;i<100;i++) {
"INSERT into Logolist (NODENAME,TITLE,SRC) VALUES (' img ', ' Google ', ' images/google.gif ')". Fordom (). Execute ();
};
You are welcome to shoot bricks!
jsql JavaScript Download Address