码迷,mamicode.com
首页 > 编程语言 > 详细

javascript随笔

时间:2014-05-14 13:39:41      阅读:412      评论:0      收藏:0      [点我收藏+]

标签:style   class   java   c   ext   http   

JS日期控件
http://www.my97.net/dp/demo/index.htm

jquery 1.10 版本后,动态绑定事件 .live 无效,改成用.on了
http://stackoverflow.com/questions/14354040/jquery-1-9-live-is-not-a-function
$(selector).live(‘click’,function)
$(parent).on(‘click’,selector,function)


dom 冒泡
<div class="a">
    <div class="b">
        <a class="c" href="#">test</a>
    </div>
</div>

 $(‘.a‘).click(function(){alert("a");});
        $(‘.b‘).click(function(){alert("b");});
        $(‘.c‘).click(function(event,data){
            console.log(data);
            event.stopPropagation();
            alert("c");}
        );

jstree
http://johntang.github.io/JsTree/_demo/index.html#integrate_demo


window.parent.frame.location.href = “”;

 

-----------------------------------------------------

 

jQuery API明确说明,1.6+的jQuery要用prop,尤其是checkBox的checked的属性的判断,即
$("input[type=‘checkbox‘]").prop("checked");
$("input[type=‘checkbox‘]").prop("disabled", false);$("input[type=‘checkbox‘]").prop("checked", true);


$(window).resize(function(){
            //process here
            console.log("------------");
            console.log($(window).height()); //浏览器当前窗口可视区域高度
            console.log($(document).height()); //浏览器当前窗口文档的高度
            console.log($(document.body).height());//浏览器当前窗口文档body的高度
            console.log($(document.body).outerHeight(true));//浏览器当前窗口文档body的总高度 包括border padding margin

        });

javascript随笔,布布扣,bubuko.com

javascript随笔

标签:style   class   java   c   ext   http   

原文地址:http://www.cnblogs.com/walkfuture/p/3726761.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!