JavaScript should pay attention when using it in ASP.NET!

xiaoxiao2021-03-06  111

JavaScript is used in ASP.NET,

If you don't pay attention to Target, sometimes you will be depressed. . Even yesterday is.

Lift a simple funtion winpen () {window.open ()} example

In HTML, regardless of Target, as long as JS writes correctly can be called

In ASP.NET.

Added a _Search's stuff (I don't know if I haven't seen it or really increase)

And originally existing _blank

You cannot call JS normally with these two target. Tip error is "can't find object"

The error should be obvious,

My opinion is:

Such as _blank, when JS is called, you have opened the new page first, then find Winopen () on the page.

There is no blank page, there is no error.

In HTML, it calls JS first, then build this page, so open 2 new windows.

转载请注明原文地址:https://www.9cbs.com/read-100646.html

New Post(0)