随笔分类 -  javascript

摘要:Js中 关于top、clientTop、scrollTop、offsetTop的用法 网页可见区域宽: document.body.clientWidth;网页可见区域高: document.body.clientHeight;网页可见区域宽: document.body.offsetWidth ( 阅读全文
posted @ 2018-04-12 16:56 keep up 阅读(360) 评论(0) 推荐(0)
摘要:效果浏览 阅读全文
posted @ 2018-04-12 16:09 keep up 阅读(180) 评论(0) 推荐(0)
摘要:图片上传本地预览 阅读全文
posted @ 2018-04-12 15:57 keep up 阅读(213) 评论(0) 推荐(0)
摘要:最近在使用echart开发图标,api里面虽然有些设置,但是如果想让柱状图每个柱的颜色都不相同,简单的通过color设置是没有作用的,这里,就要用到其他的方式了 下面只是列举下我认为比较常用的,其他的比较简单,就不说了 设置折线颜色部分 最终效果代码: 最终效果图展示: 效果就是这样啦 阅读全文
posted @ 2016-12-30 11:15 keep up 阅读(60804) 评论(0) 推荐(0)
摘要:无标题文档 0个字符 阅读全文
posted @ 2016-11-30 15:28 keep up 阅读(607) 评论(0) 推荐(0)
摘要:var re =new RegExp("^[a-zA-Z][a-zA-Z0-9_]{5,19}$"); if(re.test(aaaa)){alert("格式正确");}else{alert("格式错误");} var s_currency = /^([1-9][\d]{0,7}|0)(\.[\d] 阅读全文
posted @ 2016-11-30 15:27 keep up 阅读(165) 评论(0) 推荐(0)
摘要:11 阅读全文
posted @ 2016-10-24 10:18 keep up 阅读(7700) 评论(0) 推荐(0)
摘要:js记录鼠标的点击次数 博客园 www.cnblogs.com 提示您: 阅读全文
posted @ 2016-10-24 10:15 keep up 阅读(3333) 评论(0) 推荐(0)
摘要:删除时输入的字时出现问题 阅读全文
posted @ 2016-10-24 10:12 keep up 阅读(790) 评论(0) 推荐(0)
摘要:原理:注册mousemove事件,使元素跟随鼠标挪动;注册mouseup事件,移除mousemove事件,使得松开鼠标时元素不再跟随移动,能够固定在指定位置。在mousedown事件中注册mousemove事件和mouseup事件,这样便可完成一次完整的拖拽。 重点:IE中setCapture()的 阅读全文
posted @ 2016-09-09 11:09 keep up 阅读(395) 评论(0) 推荐(0)
摘要:此处为跳转,在不出现新页面的情况下: Response.Write("<script language=javascript>alert('提示信息.');window.location='跳转页面'</script>"); Response.Write("<script language=java 阅读全文
posted @ 2016-07-13 14:28 keep up 阅读(775) 评论(0) 推荐(0)
只有注册用户登录后才能阅读该文。
posted @ 2016-07-13 14:22 keep up
摘要:先来看看jQuery.ajax(options)的简单介绍: 通过 HTTP 请求加载远程数据。 jQuery 底层 AJAX 实现。简单易用的高层实现见 $.get, $.post 等。 $.ajax() 返回其创建的 XMLHttpRequest 对象。大多数情况下你无需直接操作该对象,但特殊情 阅读全文
posted @ 2016-06-12 13:47 keep up 阅读(4844) 评论(0) 推荐(0)
摘要:<script type="text/javascript"> //ImgD:要放图片的img元素,onload时传参可用this //h:img元素的高度,像素 //w:img元素的宽度,像素 function autosize2(ImgD,h,w) { var image=new Image() 阅读全文
posted @ 2016-06-12 13:40 keep up 阅读(3246) 评论(0) 推荐(0)
摘要:1、hasClass 2、addClass 3、removeClass //call the functions addClass(document.getElementById("test"), "test"); removeClass(document.getElementById("test" 阅读全文
posted @ 2016-06-02 17:07 keep up 阅读(2324) 评论(0) 推荐(0)
摘要:parseInt() 函数可解析一个字符串,并返回一个整数。 如果省略该参数或其值为 0,则数字将以 10 为基础来解析。如果它以 “0x” 或 “0X” 开头,将以 16 为基数。 如果该参数小于 2 或者大于 36,则 parseInt() 将返回 NaN。 阅读全文
posted @ 2014-08-13 17:24 keep up 阅读(194) 评论(0) 推荐(0)