Get the App
SLTechnology News&Howtos  ›  Development  › 

How to solve the problem that JS cannot be loaded due to asp.net updatepanel

Shulou Source: shulou.com Published: 2022-06-03 06:57:35 11月15日 Update

This article focuses on "how to solve the problem that asp.net updatepanel causes JS not to be loaded". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "how to solve the problem that asp.net updatepanel causes JS not to load".

The copy code is as follows:

Var prm = Sys.WebForms.PageRequestManager.getInstance ()

Prm.add_endRequest (function () {

/ / re-bind your jquery events here

$(document) .ready (function () {

/ / begin

Var span = $("input [id * = 'txtSpan']")

Span.focusout (function () {

Var greaterthenzero = (span.val () = = 0)

If (span.val () = = 0) {

("# spRule") .show ()

$("input [id * = 'btnSave']") .attr ("disabled", "disabled")

}

Else {

("# spRule") .hide ()

$("input [id * = 'btnSave']") .removeAttr ("disabled")

}

});

/ / end

});

}

);

At this point, I believe you have a deeper understanding of "how to solve the problem that asp.net updatepanel causes JS not to load". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Tags: Questions code content learning practical deeper interested practical practical easy to operate methods more friends websites channels inquiries Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei Shulou Information OPPO Reno MySQL Xiaomi