javascript 数据库取数据 全选和反选
javascript所对应的全选和反选 。操作数据库记录。
以下是页面代码:
<tr>
<td colspan="6" width="100%">
<table border="2" width="100%">
<tr class="center">
<th width="20%" class="center">
全选/反选<input type="checkbox" name="all"
onclick="ckeckAll(this);">
</th>
<th width="20%" class="center">
箱主
</th>
<th width="20%" class="center">
箱号
</th>
<th width="20%" class="center">
箱型
</th>
<th width="20%" class="center">
箱类
</th>
</tr>
<tbody id="listTable">
<logic:iterate id="ylxhlist" name="lssqdListForm"
property="ylxhlist"
indexId="index">
<%
int i=index.intValue();
%>
<tr>
<th width="20%" class="center">
<html:checkbox property="checkbox1" name="ylxhlist"
value="true" indexed="true"/>
<html:hidden name="ylxhlist" property="id" indexed="true"
/>
<html:hidden name="ylxhlist" property="zbid"
indexed="true" />
<html:hidden name="ylxhlist" property="xxdm"
indexed="true" />
<html:hidden name="ylxhlist" property="xldm"
indexed="true" />
<html:hidden name="ylxhlist" property="ztmc"
indexed="true" />
<html:hidden na
相关文档:
JavaScript 有六种数据类型。主要的类型有 number、string、object 以及 Boolean 类型,其他两种类型为 null 和 undefined。
String 字符串类型:字符串是用单引号或双引号来说明的。(使用单引号来输入包含引号的字符串。)如:“The cow jumped over the moon.”
数值数据类型:JavaScript 支持整数和浮点 ......
prototype精彩资料:
"javascript之prototype" http://www.cnblogs.com/zouhaijian/archive/2009/03/29/1424592.html(很简约但清晰的讲述了prototype的用途)
"JavaScript对象模型-执行模型" http://w ......
Try...Catch 语句
try...catch 可以测试代码中的错误。try 部分包含需要运行的代码,而 catch 部分包含错误发生时运行的代码。
语法:
try
{
//在此运行代码
}
catch(err)
{
//在此处理错误
}
注意:
try...catch 使用小写字母。大写字母会出错。
实例 1
下面的例子原本用在用户点击按钮时显示 " ......
如何屏蔽javascript的错误信息:
只要在页面中加入如下代码即可:
<SCRIPT LANGUAGE='JavaScript'>
<!--
//屏蔽js错误
function ResumeError() {
return true;
}
window.onerror = ResumeError;
// -->
</SCRIPT> ......
最近一直在用javascript在做项目
可是做着做着
感觉很多功能代码都是重复的。
比如对javascript数组的排序
还有对数组数据的删选以及分组
所以,后来兴致以上来。
一发不可收拾。
写了一个能在javascript中应用的 SQL 库
后来又想,怎么不能用javascript直接连接数据库呢?
又做了一个javascript直连Sql数据的类库 ......