//判断iframe是否加载完成,RMid为iframe的ID
document.getElementById("RMid").onload = function () {
alert("加载完成");
}
//在父框架操作iframe页面里的AddReceipt2方法
window.frames["RMid"].AddReceipt2();...
分类:
其他好文 时间:
2014-06-09 23:16:14
阅读次数:
238
下面说说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
原始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
异步模型看起来很美,但其实它也是有天生缺陷的.看下面代码
try {
setTimeout( function(){
throw new Error( '你抓不到我的!' );
}, 100);
} catch (e) {
console.error(e);
}
如果你已经理解了上一篇博客,那你一定了解了这样的写法是捕...
分类:
编程语言 时间:
2014-06-08 14:54:17
阅读次数:
328
先上写干货,几个开源网站:
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
var myLayer = cc.Layer.extend({ init:function()
{//2 界面 var bRet = false; if (this._super()) { bRet = true; } ...
分类:
Web程序 时间:
2014-06-07 22:13:30
阅读次数:
324
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
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