• Your jQuery AJAX is invalid, which is related to your jQuery import path


    JQuery needless to say, if you can read this article, you must know that jQuery is a JS framework. Everyone must use ajax more or less when doing projects. If you use jQuery Ajax, you need to introduce jQuery into JSP pages. When you find that your jQuery AJAX is invalid, you might as well […]

  • Ajax calls using jQuery are always error friendly solutions


    Using jQuery’s Ajax function to call a page, you find that there are always errors.JS code is as follows Copy codeThe code is as follows: $.ajax({ type: ‘post’, url: ‘TestData.aspx’, data: { language_type: ‘cn’}, dataType: ‘json’, success: function (data) { alert(‘ok’); }, error: function (data) { alert(‘err’); }); } The testdata.aspx code is as follows, […]

  • Method of realizing provincial and municipal two-level linkage function with jQuery + ASP. Net


    This paper describes the method of realizing provincial and municipal two-level linkage function with jQuery + ASP. Net. Share with you for your reference, as follows: Page HTML: <%@ Page Language=”C#” AutoEventWireup=”true” CodeFile=”ddlAjax.aspx.cs” Inherits=”ThreeAjaxDrop_ddlAjax” %> <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”> <html xmlns=”http://www.w3.org/1999/xhtml”> <head runat=”server”> < title > dropdownlist three-level linkage < / […]

  • Example of jQuery Ajax passing array parameters to the background


    Requirements: Pass array parameters to the background in JS analysis: Arrays in JS are weakly typed and can be used for any type (object, basic type). However, if the array is used for object type, only the object string — [object object] will be displayed when it is passed to the background. The reasons are […]

  • How to use JSON for Ajax parameter passing of jQuery (with JSON plug-in)


    JQuery’s Ajax call is very convenient. I like to use JSON’s data format when passing parameters. For example: Copy codeThe code is as follows: function AddComment(content) { var threadId = $(“#span_thread_id”).html(); var groupId = $(“#span_group_id”).html(); var groupType = $(“#span_group_type”).html(); var title = $(“#thread_title”).html(); var content = content.replace(/\x22/g,’”‘); $.ajax({ url: ‘/WebService/GroupService.asmx/AddThreadComment’, data: ‘{threadId:’ + threadId + […]

  • Ajax jQuery asynchronous form validation example code


    File directory: HTML code: Copy codeThe code is as follows: <html> <head> < title > asynchronous form validation < / Title ><script type=’text/javascript’ src=’jquery.js’ ></script> <script> function checkname(){ //$(“input[name=’name’]”).val() $.ajax({ type:”get”, url:’index.php’, data:”name=”+$(“input[name=’name’]”).val(), success:function(msg){ $(“#show”).append(msg); } }); } </script> </head> <body> <form name=’form’> <input name=’name’ type=’text’ onblur=’checkname();’> <span id=’show’></span><br /> < input type =’submit ‘name =’submit’ […]

  • Solution to the problem that jQuery Ajax cannot obtain the latest data under ie (ie cache)


    Today, a bug was modified to query the data using Ajax. The latest data can be obtained under Google browser, but the old data obtained in IE can not obtain the latest data. After checking the data, it is found that ie cache will make trouble again.As like as two peas, the IE request has […]

  • Implementation method of jQuery round robin graph function


    This example shares the implementation code of jQuery rotation chart function for your reference. The specific contents are as follows JQuery rotation (no animation) HTML layout <!– Entire rotation area — > <div> <!– Rotation chart — > <ul style=”left:-200px”> <!– In fact, only 5 pictures are broadcast in rotation. Put the actual first one […]

  • Ajax jQuery verifies that the user has registered the demo code


    The server code is not posted here The HTML code is relatively simple, and you need to introduce the jQuery library yourself Copy codeThe code is as follows: <body> Please enter user name: < input type = “text” / > < input type = “button” value = “check” / ><div></div> </body> JS code Copy codeThe […]

  • Using jQuery DataTables to realize data paging display function in asp.net MVC


    1. The method code in the controller is as follows: Since the stored procedure in the method does not have paging parameters, there is still room for further optimization. /// <summary> ///Get the list of measuring points /// </summary> /// <returns></returns> [HttpPost] public JsonResult GetMeasurePointList(string TreeID, string TreeType, int sEcho, int iDisplayStart, int iDisplayLength) { […]

  • The execution order of a piece of code outside jQuery $. Ajax function


    Today, I met a very painful problem. The asynchronous function $.ajax of JQuery is called in a function, and then there is a Jquery code after the $.ajax function. Every time, the code after $. AJAX is executed first. I searched the Internet for a long time and finally found out the reason. I’ll share […]

  • JQuery Ajax parameter detailed explanation supplementary example


    context Type: object This object is used to set the context of Ajax related callback functions. In other words, let this point to this object in the callback function (if this parameter is not set, then this point to the options parameter passed when calling this Ajax request). For example, specify a DOM element as […]