When the following page is running, the debugging output is always alter (1), because the order from top to bottom is as follows: the last method with the same name prevails.
<! Doctype html public "-// W3C // dtd html 4.0 Transitional // EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> <meta name = "Generator "CONTENT =" EditPlus "> <meta name =" Author "CONTENT =" "> <meta name =" Keywords "CONTENT =" "> <meta name =" Description "CONTENT = ""> </HEAD> <BODY> <input type = "button" value = "test1" onclick = "_ doPostBack ('1 ', '1'); "/> <script language =" JavaScript "> <! -- Function _ doPostBack (eventTarget, eventArgument) {alert ('2');} // --> SCRIPT <script language = "JavaScript"> <! -- Function _ doPostBack (eventTarget, eventArgument) {alert ('1 ');} // --> SCRIPT <input type = "button" value = "test2" onclick = "_ doPostBack ('1', '1 '); "/> </BODY> </HTML>
[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]