Pop-up window
Copy codeThe Code is as follows:
Page. ClientScript. RegisterStartupScript (this. GetType (), "message", "alert ('Are you sure you want to delete')", true );
The first parameter will not change,
The second parameter indicates the key value. If there is only one statement in the pop-up dialog box, you can leave it empty. If there are multiple statements, you 'd better write them. The name is defined by yourself and cannot have the same name.
The third parameter is the content of the js Code. It can be the method name of the defined method.
If the fourth parameter is true, you do not need to add the <script> </script> label to the third parameter. If it is false, you must add
Or write js Code directly on the page.
Copy codeThe Code is as follows:
Response. Write ("<Script Language = JavaScript> alert ('message! '); </Script> ");