摘要:
typeof用来检测给定变量的数据类型(也可叫做基本类型,基本数据类型。包含undefined、boolean、string、number、object、function) var message = "so easy"; alert(typeof message); //"string" alert(typeof 12); //"number"可以这样记忆:typeof是用来判断不是用new创建的“变量”。instanceof用来检测对象的类型(也可叫做引用类型。包含Object、Array、Date、RegExp、Function 阅读全文
摘要:
说明:set aa=server.createobject("ddd") isnull 说明指针为空,指针指到一个无效的位置,即对象不存在, isempty 说明指针指向一个有效位置,但是值为空1、空字符串 例: 复制代码 代码如下: a)Dim strTmp response.write(strTmp="") ' 返回true b)response.write(str="") ' 返回 true c)Dim strTmp strTmp="" response.write(strTmp=" 阅读全文
摘要:
在web开发时,有的系统要求同一个用户在同一时间只能登录一次,也就是如果一个用户已经登录了,在退出之前如果再次登录的话需要报错。常见的处理方法是,在用户登录时,判断此用户是否已经在Application中存在,如果存在就报错,不存在的话就加到Application中(Application是所有Session共有的,整个web应用程序唯一的一个对象): string strUserId = txtUser.Text; ArrayList list = Application.Get("GLOBAL_USER_LIST") as ArrayList; if (list == 阅读全文