简体   繁体   中英

jQuery not working in ASP.Net webforms

My jQuery is not working at all (ASP.Net webforms using masterpages).

The following script doesn't even put up the alert box (It is in the .aspx page in the main content section)

<script>
    $(document).ready(function () {
        alert("working");
    });​
</script>

My master pages source jquery from google api, coded like this;

<link href="Styles/Site.css" rel="stylesheet" type="text/css" />
<link href="Styles/nav.css" rel="stylesheet" type="text/css" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js" type="text/javascript"></script>
<script src="Scripts/modernizr-2.6.2.js"></script>
<link href="Content/jquery.lightbox.css" rel="stylesheet" type="text/css" />
<script src="Scripts/jquery.lightbox.min.js" ></script>

any help would be appreciated. I've had scripts working on this site before but now that script won't run, even on other pages.

在您添加的jquery的Google地址的src中添加http。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM