2013年8月5日
摘要: 1 无参数情况配置URL及其视图如下:1234(r'^hello/$', hello)def hello(request): return HttpResponse("Hello World")访问http://127.0.0.1:8000/hello,输出结果为“Hello World”2 传递一个参数 配置URL及其视图如下,URL中通过正则指定一个参数:1234(r'^plist/(.+)/$', helloParam)def helloParam(request,param1): return HttpResponse("T 阅读全文
posted @ 2013-08-05 18:02 一个人的天空@ 阅读(43521) 评论(2) 推荐(5) 编辑
摘要: 转载请注明出处:http://hi.baidu.com/leejun_2005/blog/item/9a37a22238f35c5bac34de54.htmlfrom:http://stackoverflow.com/questions/7278523/avoiding-djangos-querydict-list-limitationsfrom:http://www.djangofoo.com/93/request-post-get-multiple-values1、django获取post过来的多个键值对:Ajax:var languages = {};languages['eng 阅读全文
posted @ 2013-08-05 18:00 一个人的天空@ 阅读(51062) 评论(0) 推荐(2) 编辑
摘要: 谁都知道 在html 如果一个复选框被选中 是 checked="checked"。但是我们如果用jquery alert($("#id").attr("checked")) 会提示您是true而不是checked所以很多朋友判断 if($("#id").attr("checked")=="true") 这个是错误的,其实应该是 if($("#id").attr("checked")==true)例子里面包括了一下几个功能。 代码 Ne 阅读全文
posted @ 2013-08-05 12:05 一个人的天空@ 阅读(941) 评论(1) 推荐(0) 编辑