在asp.net和C#中应用Jquery-Ajax [英] Applying Jquery-Ajax in asp.net and C#

查看:77
本文介绍了在asp.net和C#中应用Jquery-Ajax的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好朋友请帮帮我。这是我的代码。而且我无法跑步。这些代码不起作用。所以请告诉我我错在哪里。

 <%@       语言  =  C#    AutoEventWireup   =  true    CodeFile   = 默认.aspx.cs   继承  =   _默认   %>  

< ! DOCTYPE html >

< html xmlns = http:// www。 w3.org/1999/xhtml\">
< head runat = 服务器 >
< script src = script / JavaScript.js > < / script >
< script src = http:/ /ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js\"> < / 脚本 >
< title > < / title >
< script >
$(document).ready(function(){
$( button)。 click(function(){
$ .ajax({
url: demo_test.txt ,成功:函数(结果){
$( #div1 )。html的(结果);
}
});
});
});
< / script >
< / head >
< body > ;
< 表格 id = form1 runat = server >
< div >
< <跨度 class =code-leadattribute> div id = div1 > < h2 > 让jQuery AJAX更改此文本< / h2 > < / div >
< 按钮 > 获取外部内容< / button >
< / div >
< / form >
< / body >
< / html < span class =code-keyword>>









和什么是

< script src =http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js>< ; / script>

以及如何获取此文件

解决方案

(document).ready(function(){


button)。click(function(){


.ajax({
url: demo_test.txt ,成功:功能(结果) {

hello friends please help me .this is my codes. and i am not able to run. these codes are not working . so please tell me where i am wrong.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <script src="script/JavaScript.js"></script>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
    <title></title>
    <script>
        $(document).ready(function () {
            $("button").click(function () {
                $.ajax({
                    url: "demo_test.txt", success: function (result) {
                        $("#div1").html(result);
                    }
                });
            });
        });
</script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <div id="div1"><h2>Let jQuery AJAX Change This Text</h2></div>
<button>Get External Content</button>
    </div>
    </form>
</body>
</html>





and what is
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
and how to get this file

解决方案

(document).ready(function () {


("button").click(function () {


.ajax({ url: "demo_test.txt", success: function (result) {


这篇关于在asp.net和C#中应用Jquery-Ajax的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆