摘要: from http://juliet.javaeye.com/blog/1742661. arguments[] 标识符arguments本质上是个局部变量,在每个函数中都会被自动声明并被初始化。它只在函数体中才能引用Arguments对象,在全局代码中没有定义。Arguments对象有带编号的属性,存放实参的数组。 阅读全文
posted @ 2010-02-03 08:47 kid的笔记本 阅读(113) 评论(0) 推荐(0) 编辑
摘要: (1)定义一个应用程序的初始化方法注意:我们没有为我们的应用程序类定义一个__init__()方法。在Python中,这就意味着父方法wx.App.__init()__将在对象创建时被自动调用。这是一个好的事情。如果你定义你自己的__init__()方法,不要忘了调用其基类的__init()__方法(2)房屋的基础是混凝土结构,它为其余的建造提供了坚固的基础。你的wxPython程序同样有一个基础... 阅读全文
posted @ 2010-01-21 17:04 kid的笔记本 阅读(267) 评论(0) 推荐(0) 编辑
摘要: 1、window.addEvent('domready', function() {var myObject;myObject = 0;if($chk(myObject)) {alert('Object exists');//run this} else {alert('Object does not exist');}});2、$try(//如果第一个function有错误,那么会执行下面的正确... 阅读全文
posted @ 2010-01-12 10:11 kid的笔记本 阅读(231) 评论(0) 推荐(0) 编辑
摘要: 定义: Element.Events.keyenter = { base: 'keyup', condition: function(e){ // We can basically put any logic here. // In this example we return true, when the pressed key is the // Enter-Button so the ... 阅读全文
posted @ 2010-01-05 13:17 kid的笔记本 阅读(192) 评论(0) 推荐(0) 编辑
摘要: GET是通过URL传给服务器的,POST是通过HTTP头传给服务器的,post的数据是不跟在请求的url后,而是在http头中,get是在url中post的安全性比get高,因为有的服务器会缓存get数据,post数据不会被缓存,而且当你再次刷新提交结果时,浏览器会弹出安全提示对话框。另外,get和post有一些数据格式的区别,比如说上载文件,你只能使用post方法,并且enctype只能设置成m... 阅读全文
posted @ 2010-01-05 09:33 kid的笔记本 阅读(4662) 评论(1) 推荐(0) 编辑
摘要: if request.method == 'POST': form = ContactForm(request.POST)#ContactForm('subject': 'hello', 'message': 'hoho', 'email': '1@1.com') if form.is_valid(): cd = form.cleaned_data send_mail( cd['subject']... 阅读全文
posted @ 2010-01-04 15:31 kid的笔记本 阅读(228) 评论(0) 推荐(0) 编辑
摘要: #添加新数据>>> f = ContactForm({subject': Hello, email: adrian@example.com, message: Nice site!}) #查看元素>>> f.cleaned_data{message': uNice site!, email: uadrian@example.com, subject: uHell... 阅读全文
posted @ 2009-12-22 13:29 kid的笔记本 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 直接上例子,要灵活运用第一步:.hidden{ display:none;}第二步: <divid="contentone"class="hidden">contentforone</div>第三步: varshowFunction=function(){ this.setStyle('display','block');} 第四步://给tab绑定事件$('one').... 阅读全文
posted @ 2009-12-21 17:15 kid的笔记本 阅读(179) 评论(0) 推荐(0) 编辑
摘要: <aclass="tooltipA"title="1stTooltipTitle"rel="hereisthedefault'text'of1"href="http://www.consideropen.com">Tooltip1</a>varcustomTips=$$('.tooltipA');vartoolTips=newTips(customTips);showDel... 阅读全文
posted @ 2009-12-21 15:12 kid的笔记本 阅读(243) 评论(0) 推荐(0) 编辑
摘要: vartoggles=$$('.togglers');varcontent=$$('.elements');//创建你的对象变量//使用“new”创建一个新的手风琴对象//设置开关(toogle)数组//设置内容数组varAccordionObject=newAccordion(toggles,content);选项display//这个选项决定了当页面加载后哪个元素会显示... 阅读全文
posted @ 2009-12-21 14:51 kid的笔记本 阅读(379) 评论(0) 推荐(0) 编辑