码迷,mamicode.com
首页 >  
搜索关键字:function    ( 54714个结果
判断iframe里的页面加载完成
//判断iframe是否加载完成,RMid为iframe的ID document.getElementById("RMid").onload = function () { alert("加载完成"); } //在父框架操作iframe页面里的AddReceipt2方法 window.frames["RMid"].AddReceipt2();...
分类:其他好文   时间:2014-06-09 23:16:14    阅读次数:238
一入python深似海--split
下面说说split函数的用法 def break_words(stuff): """This function will break up words for us.""" words = stuff.split(' ')#split('.',1) use '.' split one time return words def sort_words(wo...
分类:编程语言   时间:2014-06-08 18:19:21    阅读次数:336
jQuery使用serialize(),serializeArray()方法取得表单数据+字符串和对象类型两种表单提交的方法
原始form表单值获取方式(手动):$.ajax({ type: "POST", url: "ajax.php", data: "Name=摘取天上星&position=IT技术", success: function(msg){alert(msg);}, error: function(error){alert(error);} });JQ serialize()...
分类:Web程序   时间:2014-06-08 16:19:01    阅读次数:280
弹出框无论如何点都做同样的事情
今天有个需求:点击某个按钮之后,弹出对话框,然后无论如何点击都做同样的事情。主要代码如下: function dialogues(){       var r =  window.confirm();       var form1 = document.getElementById("form1");       if(r) form1.action = "";       else ...
分类:其他好文   时间:2014-06-08 15:52:57    阅读次数:179
JQuery日记6.5 Javascript异步模型(二)
异步模型看起来很美,但其实它也是有天生缺陷的.看下面代码 try { setTimeout( function(){ throw new Error( '你抓不到我的!' ); }, 100); } catch (e) { console.error(e); } 如果你已经理解了上一篇博客,那你一定了解了这样的写法是捕...
分类:编程语言   时间:2014-06-08 14:54:17    阅读次数:328
一入python深似海--函数与文件
先上写干货,几个开源网站: github.com launchpad.netgitorious.orgsourceforge.netfreecode.com 今天介绍一下python函数和文件读写的知识。 函数 def print_two(*args):#That tells Python to take all the arguments to the function a...
分类:编程语言   时间:2014-06-08 10:37:23    阅读次数:277
改进的模板替换
之前美丽湾项目是用赢家写的替换方法,替换数据时,无法深度遍历,这里修改一下方法: 1 function tempExt(h, data) { 2 return h.replace(/\{(.*?)\}/g, function (str, m) { 3 ...
分类:其他好文   时间:2014-06-07 23:05:37    阅读次数:231
cocos2d-html5 Layer 和 Scene 创建模式
var myLayer = cc.Layer.extend({ init:function() {//2 界面 var bRet = false; if (this._super()) { bRet = true; } ...
分类:Web程序   时间:2014-06-07 22:13:30    阅读次数:324
How to use the functions of apply and call
Although apply and call can implement same function. However, there is a litter different between them.Please pay attention to look at the examples be...
分类:移动开发   时间:2014-06-07 21:53:15    阅读次数:331
How to use the function of bind
The usage of bind is to define a specified scope for called function. Because the key this is easy to refer another objet, experically window, instead...
分类:其他好文   时间:2014-06-07 21:28:07    阅读次数:307
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!