码迷,mamicode.com
首页 >  
搜索关键字:var    ( 55181个结果
javascript方法
function fireEvent(element, event) { if (document.createEventObject) { var evt = document.createEventObject(); ...
分类:编程语言   时间:2014-05-12 06:12:47    阅读次数:367
【Javascript】JS获取ASP.NET CheckBoxList控件的Text和Value
由于在客户端用js是无法直接获取到ASP.NET的控件CheckboxList的值的,所以采用以下解解方案:服务器端代码: public void LoadAllTags() { var tagList = tagBO.GetAllTags(); ...
分类:编程语言   时间:2014-05-12 05:11:06    阅读次数:376
【Javascript】JS常用方法扩展
1、格式化字符串操作String.prototype.format = function(args) { if (arguments.length>0) { var result = this; if (arguments.length == 1 && typeof (args) == "objec...
分类:编程语言   时间:2014-05-12 04:17:43    阅读次数:314
增加p()函数,方便开发中对变量打印调试
在开发的过程中,我们经常要输出一下变量看看得到的结果是什么,我们就要根据变量的类型选择使用echo,print_r或者var_dump,brophp框架中的p()函数会自动根据变量类型选择用什么方法为我们输出变量,所以我收藏了 function p() { $args=func_...
分类:其他好文   时间:2014-05-12 02:59:51    阅读次数:298
javascript的hoisting机制
javascript解释器中存在一种变量声明被提升(hoisting)的机制,即变量(函数)的声明会被提升到作用域的最前面。即使把声明代码写在最后面。 alert(foo); //function foo(){} alert(bar); //undefined var bar = func...
分类:编程语言   时间:2014-05-12 00:42:19    阅读次数:369
JQuery日记 5.11 Sizzle选择器(五)
setDocument = Sizzle.setDocument = function( node ) { var hasCompare, //node为Element时返回node所属document //node为Document时返回node //node为空时返回window.document doc = node ? node.ownerDocument || node...
分类:Web程序   时间:2014-05-11 22:41:15    阅读次数:459
右键弹出自定义菜单,很有意思呀!
右键弹出自定义菜单,很有意思呀! 右键菜单 function showmenuie5(){ var rightedge=document.body.clientWidth-event.clientX var bottomedge=document.body.clientHeight-event.clientY if (rightedge ie5menu.style.left=d...
分类:其他好文   时间:2014-05-11 20:20:35    阅读次数:240
如何做页面自动刷新,又不用让用户按回车键来提交数据!
假设叶面中有如下form:    ...  如果页面要自动刷新,但该页面有Request.Form,那么通常会出现一个提示框,需要用户确定来提交数据,这就不是自动  刷新了。而对于监控或股票显示来说,不要用户干预又非常重要,下面就可以解决该问题:   var limit="0:60" //定义刷新时间 if (document.images){  var parselimi...
分类:其他好文   时间:2014-05-11 19:54:58    阅读次数:314
jquery tag页签切换
$(document).ready(function () { var tag=$(".tags"); tag.mouseover(function(){ $(this).addClass("tagOn").siblings().removeClass("tagOn"); var index ...
分类:Web程序   时间:2014-05-11 18:22:45    阅读次数:415
封装实现JavaScript 文件的动态加载功能
function loadScript(url, callback){ var script = document.createElement ("script") script.type = "text/javascript"; if (script.readyState){ //IE script.onreadystatechange = function(){ if (script.read...
分类:编程语言   时间:2014-05-11 15:07:11    阅读次数:316
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!