jquery在asp.net中不起作用

ako*_*ako 2 javascript c# asp.net jquery

我有一个asp.net网站,我想要点击一个标签,然后一个警报,例如使用jquery解雇,但它不起作用:这是我试过的:

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
<script type="text/javascript" src="../js/jquery.min.js"></script>
<script type="text/javascript">
    $('#scheduled').click(function () {
        alert("alert something");//not work
    });
    $('.ako').click(function (e) {
        alert("alert something");//not work
    });
    $("#<% =scheduled.ClientID%>").click(function (e) {
        alert("alert alert alert");//not work
    });
</script>
Run Code Online (Sandbox Code Playgroud)

这是Label标签:

            <asp:Panel runat="server" CssClass="row">
            <asp:Label runat="server" CssClass="btn btn-primary btn-lg " class="ako"    Style="margin: 10px" ID="scheduled" Text="scheduled" />
        </asp:Panel>
Run Code Online (Sandbox Code Playgroud)

我是用户母版页,此代码在Default.aspx页面中.

没有jquery(javascript)警报工作.谢谢 .

Pra*_*lan 5

文档就绪处理程序中包装代码以在加载元素后绑定事件处理程序或在页面末尾移动代码.

$(document).ready(function(){
    $('#scheduled').click(function () {
        alert("alert something");//not work
    });
    $('.ako').click(function (e) {
        alert("alert something");//not work
    });
    $("#<% =scheduled.ClientID%>").click(function (e) {
        alert("alert alert alert");//not work
    });
});
Run Code Online (Sandbox Code Playgroud)