Home > front end >  Asp implementation of js function problem?
Asp implementation of js function problem?

Time:12-14



<meta charset="utf-8" & gt;
Title
<meta HTTP - equiv="content-type" Content="text/HTML. Charset=utf-8 "& gt;
<meta name="viewport" content="width=device - width, initial - scale=1.0, the maximum - scale=1.0, user - scalable=no"/& gt;
<meta name="HandheldFriendly" content="true"/& gt;
<meta name="MobileOptimized" content="320"/& gt;
<%

Response. Write "& lt; Script>"
Response. Write "window. The onl oad=function () {
"Response. Write "alert ();"
Response. Write "}
"Response. Write "& lt;/script>"

% & gt;









<body>




Js:
The function deviceVibrate () {
Plus, the device vibrate ();
}


Question: I introduced into the page is to perform alert () is A success, I put the alert () with deviceVibrate () doesn't work, but I click on A TAB, is effective, why?

CodePudding user response:

Good plus haven't load,

CodePudding user response:

Lord make sure that the js code plus object is introduced and execute

CodePudding user response:

This has nothing to do with asp, change & lt; Body> The location of the
First no response, directly in the page code onl oad handler look at what the problem is, the object before the call ever being loaded to come in,

CodePudding user response:

According to my you do a simple test to try
<% @ LANGUAGE="VBSCRIPT" CODEPAGE="65001" % & gt;

Test
<link rel="shortcut icon" href="https://bbs.csdn.net/topics/images/favicon.ico"/& gt;
<meta HTTP - equiv="content-type" Content="text/HTML. Charset=utf-8 "/& gt;


<body>













<script language="javascript" & gt;
{

The function Test_demo_jsShow ()
{
Alert (" you point/DEMO button test ");
}

}
</script>
======================================================
Again, test your asp whether js statements in the normal

CodePudding user response:

Mention:
You will be my the code above is saved as the index. The asp, and then look in IIS running effect

CodePudding user response:

The definition of deviceVibrate? Should be not loaded

CodePudding user response:

reference 5 floor shandong blue jays pay your reply:
note:
You will be my the code above is saved as the index. The asp, and then look in IIS running effect


Run this code is no problem, but I don't know what this code is in the test

CodePudding user response:

The
[email protected] reference 7 floor????? Response:
Quote: refer to fifth floor shandong blue jays response: your salary

Mention:
You will be my the code above is saved as the index. The asp, and then look in IIS running effect


Run this code is no problem, but I don't know what this code is in the test



Statement, I write the index of asp is very simple, its purpose is to execute JS statements directly click on the button of pop up a dialog

  •  Tags:  
  • ASP
  • Related