
op写前端
文章平均质量分 70
拖拉机拖拉机
这个作者很懒,什么都没留下…
展开
-
jquery用法小结
其中三个简单而有用的方法如下:text() – 设置或取得指定元素的文本内容。html() – 设置或取得指定元素的内容(包括HTML标记)val() – 设置或取得表单某个输入域的值。一定要分清三者的区别例如,下面代码使用html()和text()方法取得HTML元素的内容:$("#btn1").click(function(){ alert("Text: " +原创 2013-12-26 14:11:33 · 834 阅读 · 0 评论 -
jquery+ajax简单的例子
ajax testjQuery(function($){ $('button').click(function(){ var name = $(this).attr('name'); $.ajax({ url:"hello.php", type:"POST", data:{'search':name}, beforeSend: function(){原创 2013-11-29 10:46:35 · 11960 阅读 · 1 评论 -
bootstrap的一些属性问题
有些属性记不住啊,记录下吧input的size问题class=>"input-mini"class=>"input-small"class=>"input-medium"class=>"input-large"class=>"input-xlarge"class=>"input-xxlarge"body修改背景图片textarea修改背景图片标题栏设置背景颜色原创 2013-12-23 23:10:14 · 7954 阅读 · 0 评论 -
bootstrap 和传统的html 关于button的属性问题
在ie下,标记恐怕还存在几个不大不小的问题。在一个表单里,如果有一个以上"submit"类型的标签存在,在表单被提交时,不管你点击哪 个,所有的值都会被post/get。的缺省type属性被设置为"button",但是在A级别浏览器下,应该设置为"submit"才对如果你用javascript去访问的value属性,IE却返回了的 innerHTML属性,很让人恼火。 (可以使用"getA原创 2013-12-28 02:57:19 · 4447 阅读 · 1 评论 -
jquery实现拖拽
test #draggable { width: 150px; height: 150px; padding: 0.5em; } $(function () { for(i=0;i<11;i++) $("#draggable"+i).draggable(); }); 鼠标长按移动1 鼠标长按移动2 鼠标长按移动3 鼠标长按移动4 鼠标长按移动5 鼠原创 2014-05-15 16:02:06 · 725 阅读 · 0 评论 -
op方便快速写出优雅的前端
1.bootstrap 没的说非常好用原创 2014-06-06 14:45:47 · 1584 阅读 · 0 评论 -
tips
1.获取诸如2014-05-10的时间 function get_time(n_day_ago) { var cur_date=new Date(); var dst_date=new Date(cur_date - n_day_ago*86400000);原创 2014-05-14 12:31:15 · 735 阅读 · 0 评论 -
Folder Structure for Single Page Applications
It makes me sad to see so many people still use old, archaic folder structure for their projects. It seems that while front-end development has moved light years ahead, the structure people use did转载 2015-05-31 16:15:35 · 633 阅读 · 0 评论