摘要:js判断undefined类型 if (reValue== undefined){ alert("undefined"); } 发现判断不出来,最后查了下资料要用typeof方法:if (typeof(reValue) == "undefined") { alert("undefined"); } typeof 返回的是字符串,有六种可能:"number"、"string"、"boolean"、"object"、"function"、&
阅读全文
随笔分类 - 【06】Javascript
摘要:方式一:方式二:!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"headmeta http-equiv="Content-Type" content="text/html; charset=gb2312" /title按钮倒计时/title/headbodyplabelinput ty
阅读全文
摘要:方法一: function getvalue() { var b=document.all.rbtid.length var a=document.getElementById("rbtid").cells.length; //alert(b);结果为5 //alert(a);结果为4 //for(var i=0;ib-1;i++)这样也行 for(var i=0;ia;i++) { var ss="rbtid_"+i; var aa=document.getElementById(ss).value; //if(eval('document.all.rbtid_'+i).check
阅读全文
摘要:选择人员或者部门或其他时,经常会用到2个listbox,下面这js代码,希望能给大家以及自己带来方便 选择人员或者部门或其他时,经常会用到2个listbox,下面这js代码,希望能给大家以及自己带来方便function SelectAll() { var lst1=window.document.getElementById("SourceListBox"); var length = lst1....
阅读全文
摘要:作者:冷枫 来源:CSDNDataGrid控件: <Columns> <asp:TemplateColumn> <HeaderStyle Width="10px"></HeaderStyle> <HeaderTemplate> <INPUT id="CheckAll" name="CheckAll" type="checkbox"...
阅读全文
摘要:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>井底的蛙</title>&l...
阅读全文
摘要:http://book.csdn.net/bookfiles/344/
阅读全文
摘要:在很多程序中需要使用CheckBox的跨页面复选功能,本例实现了GridView多页复选功能SelectMultiPages.aspx1<%@PageLanguage="C#"AutoEventWireup="true"CodeFile="SelectMultiPages.aspx.cs"2Inherits="SelectMultiPages"%>34<!DOCTYPEHTMLP...
阅读全文
摘要:动态添加表格行文/Ray表格部分代码如下:<table id="testTbl" border=1><tr id="tr1"><td width=6%><input type=checkbox id="box1"></td><td id="b">第一行</td></tr><tr id="tr2"&...
阅读全文
摘要:<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>无标题文档</title></head><body><table width="200" border="1"> <tr...
阅读全文
摘要:<html><head><title>用join方法返回一个将数组所有元素用指定符号连在一起的字符串</title></head><body><script type="text/javascript">var a, b;a = new Array(0,1,2,3,4);b = a.join("-");docume...
阅读全文
摘要:需要的图片:需要的图片:演示:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd"><HTML><HEAD><TITLE>SooJs_仿韩国Google效果&l...
阅读全文
摘要:BSRightMenu/*** <p>标题: BSRightMenu</p>* <p>功能描述: BS右键菜单对象。装载所有的右键菜单块</p>* <p>作者: BinaryStar原创B/S框架</p>* <p>版本: 0.1</p>* <p>创建日期: 2005-12-21</p&...
阅读全文
摘要:BSRightItem/*** <p>标题: BSRightItem</p>* <p>功能描述: 右键菜单项。</p>* <p>作者: BinaryStar原创B/S框架</p>* <p>版本: 0.1</p>* <p>创建日期: 2005-12-21</p>*/function...
阅读全文
摘要:效果:javascript实现右键菜单的方式很多,思路也各有千秋,在介绍代码之前先简单介绍一下我的右键对象思路。 1、 一个右键对象包含多个右键块。 2、 任何一个页面或控件都能且最多只能挂一个右键块。3、 每个右键块拥有多级右键项。4、 采用pupop方式。下面分对象介绍源码:公共部分:/*** <p>标题: BinaryStar右键菜单JS模型</p>* <p&g...
阅读全文
摘要:第一种:<script language="javascript" type="text/javascript"> window.location.href="login.jsp?backurl="+window.location.href; </script>第二种:<script language="javascript">alert("返回");windo...
阅读全文
摘要:网页可见区域宽: document.body.clientWidth;网页可见区域高: document.body.clientHeight;网页可见区域宽: document.body.offsetWidth (包括边线的宽);网页可见区域高: document.body.offsetHeight (包括边线的宽);网页正文全文宽: document.body.scrollWidth;网页正文全...
阅读全文
摘要:下面的五种方法都可以帮你解决这种问题1.<script language=javascript>function document.onkeydown(){ if (event.keyCode == 13) { if (event.srcElement == document.getElementById('<%=txtEmpCode.ClientID%>')) docu...
阅读全文
摘要:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML><HEAD><TITLE> New Document </TITLE><META NAME="Generator" CONTENT="EditPlus"><META NAME="Auth...
阅读全文
摘要:<script language="javascript" type="text/javascript"> //author:玉匕首 //homePage:http://www.baiweiwu.cn //date:2007.10.29 //Email:alexaren¥163.com function GetRTime(){ var xmlHttp = false; //获取服务器时...
阅读全文

浙公网安备 33010602011771号