jquery基础问题,点击button没有效果

补全 发布于 2013/05/09 23:00
阅读 1K+
收藏 1
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="test.aspx.cs" Inherits="KJNet.test" %>


<%@ Register src="controls/WUC_ClassifyManage.ascx" tagname="WUC_ClassifyManage" tagprefix="uc1" %>


<%@ Register src="controls/WUC_NoteAdd.ascx" tagname="WUC_NoteAdd" tagprefix="uc2" %>


<!DOCTYPE html>

<head>
	<meta charset="utf-8">
	<title>AdminPanel</title>
	 <link rel="stylesheet" href="css/screen.css" type="text/css" media="screen" title="default" />
	<!--[if lt IE 9]><link rel="stylesheet" type="text/css" href="css/ie.css" /><![endif]-->
</head>
 
<body>

    <form id="form1" runat="server">
   
     <input id="Button1" type="button" value="button" />
      <script src="../Scripts/jquery-1.7.2-vsdoc.js" type="text/javascript">
      $(document).ready(function(){ 
         $("#Button1").click(function () {
            $.ajax({
                type: "POST",
                contentType: "appliction/json",
                url: "service/NoteClassifyManages/GetAll",
                data: "{}",
                dataType: 'json',
                error: function (x, e) { alert(e); },
                success: function (result) {
                    alert(result);
                }
            });
          });
     });
    </script>
    <uc1:WUC_ClassifyManage ID="WUC_ClassifyManage1" runat="server" />
        
        
        
        <div>
        11<uc2:WUC_NoteAdd ID="WUC_NoteAdd1" runat="server" />
&nbsp;</div>
        </form>
        
        
</body>
</html>
<!-- 想点Button1按钮访问webservice 输出结果,但是没有效果。 -->
加载中
0
布谷鸟
布谷鸟

<script>标记写错了,js方法代码要重新写一对<scriprt></script>

首先引用jquery<script src='....'></script>

然后再打一对

<script>
//这里面写事件代码
</script>

返回顶部
顶部