摘要: 重要事项:在 IE 5.0 及以后版本中,版本号是不正确的!在 IE 5.0 和 IE 6.0 中,微软为 appVersion 字符串赋的值是 4.0。怎么会出现这样的错误呢?无论如何,我们需要清楚的是,JavaScript 在 IE6、IE5 和 IE4 中的获得的版本号是相同的。检测浏览器及版本[代码]检测浏览器的更多信息[代码]结果:浏览器:Microsoft Internet Explo... 阅读全文
posted @ 2010-10-12 17:16 xfyn 阅读(283) 评论(0) 推荐(0) 编辑
摘要: <html><body><script type="text/javascript">function sortNumber(a, b){return a - b}var arr = new Array(6)arr[0] = "10"arr[1] = "5"arr[2] = "40"arr[3] = "25"arr[4] = "1000"arr[5] = "1"... 阅读全文
posted @ 2010-10-12 16:42 xfyn 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 定义日期Date 对象用于处理日期和时间。可以通过 new 关键词来定义 Date 对象。以下代码定义了名为 myDate 的 Date 对象:注释:Date 对象自动使用当前的日期和时间作为其初始值。操作日期通过使用针对日期对象的方法,我们可以很容易地对日期进行操作。在下面的例子中,我们为日期对象设置了一个特定的日期 (2008 年 8 月 9 日):注意:表示月份的参数介于 0 到 11 之间... 阅读全文
posted @ 2010-10-12 16:13 xfyn 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1 <html> 2 <head> 3 <script type="text/javascript"> 4 function startTime() 5 { 6 var today=new Date(); 7 var h=today.getHours(); 8 var m=today.getMinutes(); 9 var s=tod 阅读全文
posted @ 2010-10-12 16:11 xfyn 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 对字符串和数字进行加法运算请看这些例子:x=5+5;document.write(x);x="5"+"5";document.write(x);x=5+"5";document.write(x);x="5"+5;document.write(x);结果:10555555规则是:如果把数字与字符串相加,结果将成为字符串。 阅读全文
posted @ 2010-10-12 14:00 xfyn 阅读(5519) 评论(0) 推荐(0) 编辑
摘要: 当页面载入时,会执行位于 body 部分的 JavaScript。当被调用时,位于 head 部分的 JavaScript 才会被执行在哪里放置 JavaScript页面中的脚本会在页面载入浏览器后立即执行。我们并不总希望这样。有时,我们希望当页面载入时执行脚本,而另外的时候,我们则希望当用户触发事件时才执行脚本。位于 head 部分的脚本:当脚本被调用时,或者当事件被触发时,脚本就会被执行。当你把脚本放置到 head 部分后,就可以确保在需要使用脚本之前,它已经被载入了。Code highlighting produced by Actipro CodeHighlighter (freewa 阅读全文
posted @ 2010-10-12 13:54 xfyn 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 如何与老的浏览器打交道那些不支持 JavaScript 的浏览器会把脚本作为页面的内容来显示。为了防止这种情况发生,我们可以使用这样的 HTML 注释标签:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--><html><body><script type="text/javascript"><!--document.write("Hello World!");// 阅读全文
posted @ 2010-10-12 13:52 xfyn 阅读(115) 评论(0) 推荐(0) 编辑
摘要: SQL2005中row_number()等函数的用法2005比2000新增了几个函数,分别是row_number()、rank()、dense_rank()、ntile(),下面以实例分别简单讲解一下。代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1 create table gg(sname varchar(10),sort varchar(10),num int) 2 go 3 4 insert into gg 5 select 阅读全文
posted @ 2010-10-12 10:12 xfyn 阅读(862) 评论(0) 推荐(0) 编辑
摘要: using System.ComponentModel; /// <summary> /// 例外 /// </summary> public const string CS_EXCLUDE = "EXCLUDE";代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#region SetContainerControlEnabled /// <summary> /// 设定容器内控件是 阅读全文
posted @ 2010-10-09 09:19 xfyn 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 将N后单引号里的字符转换为Unicode字符 阅读全文
posted @ 2010-09-30 15:36 xfyn 阅读(585) 评论(0) 推荐(0) 编辑