javascript复选框选择
string cbSelectOnClickJS = @"
if(this.checked)
{
document.getElementById('" + hidSelected.ClientID + @"').value += ',' + this.value;
}
else
{
document.getElementById('" + hidSelected.ClientID + @"').value
= document.getElementById('" + hidSelected.ClientID + @"').value
.replace(',' + this.value,'');
}";//else表示去掉最后一个逗号
checkBox.Attributes.Add("onclick", cbSelectOnClickJS);
异常的使用方法
string strIsSpecial = ""; //判断是否特殊的选人
try
{
strIsSpecial = dic["IsSpecial"];
}
catch (Exception e) { }
相关文档:
1. oncontextmenu="window.event.returnValue=false" 将彻底屏蔽鼠标右键
<table border oncontextmenu=return(false)><td>no</table> 可用于Table
2. <body onselectstart="return false"> 取消选取、防止复制
3. onpaste="return false" 不准粘贴
4. oncopy="return false;" oncut="re ......
javascript定义二维数组的方法 javascript本身只支持一维数组,
有时非要用到二维数组的时候, 可以将一维数组的分项又定义为一个数组, 二维数组就是用数组构成的数组
Var aa=new Array(); //定义一维数组
for(i=1;i<=10;i++)
{
aa[i]=new Array(); //将每一个子元素又定义为数 ......
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head ru ......
1. oncontextmenu="window.event.returnValue=false" 将彻底屏蔽鼠标右键
<table border oncontextmenu=return(false)><td>no</table> 可用于Table
2. <body onselectstart="return false"> 取消选取、防止复制
3. onpaste="return false" 不准粘贴
4. oncopy="return false;" oncut="re ......
这里 是三种导出,网上搜的,excel导出还行,word就不好了,不是我想要的那种,但是还是贴出来了 嘿嘿,希望有更好的 告诉我下 谢谢,这里的word导出时利用复制黏贴原理,感觉很不好,有一种导出excel也是如此,这里还有导出表格信息的,不是复制黏贴%
<script language="javascript">
/**//*
*
&n ......