html jquery post this code htm 對象 blog 欄目 JQuery 简体版
原文   原文鏈接
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>能夠給jq用也能夠給js用</title>
    <style>
    .dl{width: 100px; height: 100px; background: yellow;}
    </style>
    <script src='../jquery-3.1.1.min.js'></script>
    <script>
    $(function(){
        var  a='hellow';
        var  b=new Date;
        var  c='  arrt  ';
        var  arr=['a','b','c','b','d',];
        //$.type();判斷類型比typeof用處廣;能判斷new出來的對象屬性;
        console.log($.type(a));
        console.log($.type(b));

       //trim()能夠去除空格
        console.log($.trim(c));

        // inArray()相似於indexof; 獲取index;
        console.log($.inArray('c',arr));

        // proxy(); 改變this指向;
/*        function show(fn1,fn2){
             alert(fn1);
             alert(fn2);
            alert(this);
        }
        
      $(document).click($.proxy(show,window,3,4));
     })
      */


    </script>
</head>
<body>
    <div class="dl"></div>
</body>
</html>
相關文章
相關標籤/搜索
每日一句
    每一个你不满意的现在,都有一个你没有努力的曾经。
本站公眾號
   歡迎關注本站公眾號,獲取更多信息