js特效功能
文章平均质量分 59
cypakoo
这个作者很懒,什么都没留下…
展开
-
js读取屏幕分辨率
语法设置:function test(){ var width=screen.width; var height = screen.height; alert("width : "+width) ; alert("height : "+height) ; }原创 2012-01-11 15:58:31 · 596 阅读 · 0 评论 -
js控制table
//删除其中一行function deltr(trid){ //alert(trid); var tab=document.getElementById("signFrame");//该表的id值 var row=document.getElementById(trid); //该行tr的id值 var index=row.rowIndex;//r原创 2012-01-11 16:01:25 · 506 阅读 · 0 评论 -
js动态生成控件(增删改)
运行效果:源代码: #tab { border: 1px solid #aaa; border-collapse: collapse; width: 80%; }原创 2012-01-11 15:57:24 · 706 阅读 · 0 评论 -
js刷新
js刷新分两种情况:一、本页面刷新;二、Frames刷新针对第一种情况应该是:window.location.reload();第二种情况可以这样实现:window.parent.frames[i].location.reload(); 其中window.parent是指该页面的顶层Frame(实际是Frameset),然后不管该Frame下有多少子Frame/Frames原创 2012-01-11 16:05:27 · 413 阅读 · 0 评论 -
js鼠标悬停
ie4=(document.all)?true:false;ns4=(document.layers)?true:false;function toExit(){var args=toExit.arguments;var visible=args[0];if(ns4){theObj=eval("document.layers[\'"+args[1]+"\']");if(原创 2012-01-11 16:25:31 · 1058 阅读 · 0 评论 -
js获取鼠标坐标
获取鼠标坐标function mousePosition(ev){if(ev.pageX || ev.pageY){return {x:ev.pageX, y:ev.pageY};}return {x:ev.clientX + document.body.scrollLeft - document.body.clientLeft,y:ev.clientY +原创 2012-01-11 16:10:58 · 612 阅读 · 0 评论 -
js拉动效果
拉动效果 .item{height:25px;line-height:25px;} function ColOrExpand(index) { if(typeof index=="number") { var o=document.getElementById原创 2012-01-11 16:13:31 · 692 阅读 · 0 评论 -
js消除重复
Array.prototype.unique=function(){ var a={}; for(var i=0;i if(typeof a[this[i]]=="undefined") a[this[i]]=1; } this.length=0; for(var i in a){ this[this.length]=i;原创 2012-01-11 16:06:06 · 443 阅读 · 0 评论 -
js日历
直接在控件中调用:HS_setDate(this)this:是当前控件。EX: type="text" value="" size="10" onFocus="HS_setDate(this)" onPropertyChange = 'checkDate(document.all.CREATED_TIME_START.val原创 2012-01-11 16:04:20 · 643 阅读 · 0 评论 -
js判断值
"^\\d+$" //非负整数(正整数 + 0) "^[0-9]*[1-9][0-9]*$" //正整数 "^((-\\d+)|(0+))$" //非正整数(负整数 + 0) "^-[0-9]*[1-9][0-9]*$" //负整数 "^-?\\d+$" //整数 "^\\d+(原创 2012-01-11 16:02:16 · 428 阅读 · 0 评论 -
js获取日期
var myDate = new Date(); myDate.getYear(); //获取当前年份(2位) myDate.getFullYear(); //获取完整的年份(4位,1970-????) myDate.getMonth(); //获取当前月份(0-11,0代表1月) myDate.getDate(); /原创 2012-01-11 16:00:28 · 382 阅读 · 0 评论 -
js几种跳转
按钮式:链接式:返回上一步">返回上一步直接跳转式:window.location.href='http://www.ddhbb.com';开新窗口:JS跳转页面参考代码第一种: window.location.href="login.jsp?backurl="+window.location.href; 第二种: al原创 2012-01-11 16:09:15 · 937 阅读 · 0 评论