1 function getBrowserInfo(){ 2 var Sys = {}; 3 var
ua = navigator.userAgent.toLowerCase(); 4 var s; 5 ...
分类:
Web程序 时间:
2014-05-24 02:10:52
阅读次数:
322
//滚动到指定元素的id处 如:$("#Exam82") function Jump() { var
scroll_offset = $("#Exam82").offset(); //得到Exam82这个div层的offset,包含两个值,top和left
$("body,html").an...
分类:
其他好文 时间:
2014-05-24 01:56:28
阅读次数:
410
首先用session将随机生成的验证码的值传到页面,然后获取当前文本框中输入的值
进行对比;代码如下:生成的随机数,把它传到session里面然后写Ajax代码如下:function checkYZM(){ getXmlhttp();
xmlHttp.open("GET","chekYZ...
分类:
Web程序 时间:
2014-05-24 00:32:19
阅读次数:
358
var names = document.getElementById("names");var
pwds = document.getElementById("pwds");function subtton(){ if(names.value == ""
&& names.value.len...
分类:
其他好文 时间:
2014-05-24 00:27:14
阅读次数:
242
/**方法:Array.remove(dx)*功能:根据元素值删除数组元素.*参数:元素值*返回:在原数组上修改数组*作者:pxp*/Array.prototype.indexOf=function(val){for(vari=0;i-1){this.splice(index,1);}};/**方法...
分类:
Web程序 时间:
2014-05-24 00:22:05
阅读次数:
308
在定义函数时,我们一般使用下面这两种方法:使用函数声明定义:123function sum
(a, b) {return a + b;}使用函数表达式定义:123var sum = function (a, b) {return a +
b;}调用方法都是一样的:如求“1+1”等于几:1alert(...
分类:
编程语言 时间:
2014-05-23 23:43:04
阅读次数:
442
//校验是否全由数字组成function isDigit(s){var
patrn=/^[0-9]{1,20}$/;if (!patrn.exec(s)) return falsereturn
true}//校验登录名:只能输入5-20个以字母开头、可带数字、“_”、“.”的字串function i...
分类:
其他好文 时间:
2014-05-23 22:42:29
阅读次数:
423
题目:Given two binary trees, write a function to
check if they are equal or not.Two binary trees are considered equal if they are
structurally identical...
分类:
其他好文 时间:
2014-05-23 12:40:21
阅读次数:
352
window.onload=function(){ //创建select var select1=
document.createElement("select"); select1.id="select1"; for(var i=0;i<5;i++){
...
分类:
Web程序 时间:
2014-05-23 12:23:36
阅读次数:
439
http://www.ablanxue.com/prone_2866_1.htmlwindow.parent.onscroll
= window.parent.onresize = window.onload =function () { var oFix_box = doc...
分类:
Web程序 时间:
2014-05-20 07:52:20
阅读次数:
448