码迷,mamicode.com
首页 >  
搜索关键字:function    ( 54714个结果
ie7使用$(obj).attr("onclick","alert(111)")没效果解决方案
一、ie7使用$(obj).attr("onclick","alert(111)")没效果 改成 1) $(obj).bind("click",function(){ ????alert(111); }) 2) $(obj).click(function(){ ????alert(111); }) 二、绑定事件时,直接传ID会导致...
分类:其他好文   时间:2014-08-14 11:04:38    阅读次数:187
js中格式化日期
Date.prototype.Format = function (fmt) { //author: meizz var o = { "M+": this.getMonth() + 1, //月份 "d+": this.getDate(), //日 "h+": this.getHours(), //小时 ...
分类:Web程序   时间:2014-08-14 10:54:18    阅读次数:233
js字符串倒序
有的时候我们需要把字符串倒序。 比如“范坚强”的倒序就是“强坚范”。 如何对字符串进行倒序呢?你首先想到的方法就是生成一个栈,从尾到头依次取出字符串中的字符压入栈中,然后把栈连接成字符串。 var reverse = function( str ){ var stack = [];//生成一个栈 for(var len = str.length,i=len;i>0;i-- ){ ...
分类:Web程序   时间:2014-08-14 10:52:38    阅读次数:280
html表格动态添加删除行(有后台操作)
Form Object example function delrow1() { var oElement=event.srcElement; while(oElement.tagName!="TR") { oElement=oElement.parentElement; } var oTBody=oElement.parentElement; oT...
分类:Web程序   时间:2014-08-14 10:50:48    阅读次数:279
flexview模板中解决图表控件不能显示的问题
在flexview模板中的baseWidget.as中,填写如下代码: override public function get moduleFactory():IFlexModuleFactory { return FlexGlobals.topLevelApplication.moduleFactory; }...
分类:其他好文   时间:2014-08-14 10:46:08    阅读次数:165
上传图片带预览功能兼容IE和火狐等主流浏览器
图片上传 function setImagePreview(fileObj, previewObj, localImg) { var docObj=document.getElementById(fileObj); var imgObjPreview=document...
分类:其他好文   时间:2014-08-14 10:25:08    阅读次数:231
jQuery 超屏加载
jQuery 超屏加载,当文档超出屏幕的高度时,加载最新下个列数据$(window).scroll(function () { var height = $(document).height(); //页面的高度 var keheight = $(window).height(); //...
分类:Web程序   时间:2014-08-14 10:24:28    阅读次数:200
【ThinkingInC++】17、使用函数指针
/** * 功能:使用函数指针 * 时间:2014年8月14日07:23:42 * 作者:cutter_point */ #include #include using namespace std; void fun1() { cout<<"The function fun1 called.."<<endl; } int main() { void (*fp)(); /...
分类:编程语言   时间:2014-08-14 08:17:28    阅读次数:231
【ThinkingInC++】18、指向函数的指针数组
/** * 功能:指向函数的指针数组 * 时间:2014年8月14日07:24:46 * 作者:cutter_point */ #include #include using namespace std; //这里N就是函数名,而DF(N)就代表了后面的N函数,N可以变 #define DF(N) void N() {cout<<"function "#N...
分类:编程语言   时间:2014-08-14 08:17:18    阅读次数:220
PHP解码unicode编码中文字符代码示例
在抓取某网站数据,结果在数据包中发现了一串编码的数据:"......\u65b0\u6d6a\u5fae\u535a......", 这其实是中文被unicode编码后了的数据,想解码出中文来。解决方案:方案A(稳定版+推荐):function replace_unicode_escape_sequ...
分类:Web程序   时间:2014-08-14 06:07:57    阅读次数:295
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!