加载函数在jquery

时间:2016-02-02 11:22:19

标签: javascript jquery html

我使用锚标记从index.html页面重定向到about.html但是在about.html页面加载功能内部无法正常工作。
代码如下:

index.html 页面

<li>
    <a href="about.html" class="item-link close-panel item-content">
        <div class="item-media">
            <i class="fa fa-file-text-o"></i>
        </div>
        <div class="item-inner">
            <div class="item-title">My Profile</div>
        </div>
    </a>
 </li>

about.html 页面

<script src="../jquery.min.js"></script>

<script>
    $(window).load(function () {
        alert("hi");
    });
</script>
<div class="navbar">
    <div class="navbar-inner">
        <div class="left">
            <a href="index.html" class="link">
                <span class="icon-chevron-left"></span> <span>Back</span>
            </a>
        </div>
        <div class="center sliding">Article</div>
        <div class="right">
            <a href="#" class="link icon-only open-panel" data-panel="right">
                <span class="kkicon icon-user"></span>
            </a>
        </div>
    </div>
</div>

0 个答案:

没有答案