'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();
};
<!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();"> 切换 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>
</html>