In program development, a problem occurs: The content of "data table content example" and "corresponding field" needs to be dynamically changed based on the changes in the data table ,:
The data table code is as follows:
<Select name = "table_list" class = "an" id = "table_list"Onchange = "select_table ()">
Analysis:
We know that the "onchange" action is executed only when the option value of "table_list" is changed. Therefore, when the file is uploaded, the "table_list" option is refreshed, does not trigger its "onchange" action, so the content of "data table content example" and "corresponding field" does not reflect the actual data table information in a timely manner.
Solution:
Because I use a non-component upload, the webpage contains an IFRAME. After uploading a file using the relevant ASP file, use the following statement to call the "onchange" action of "table_list,
Response. Write "<script language =" "JavaScript" "type =" "text/JavaScript">"
Response. Write ("parent.doc ument. getelementbyid (" "table_list" "). onchange ()")
Response. Write ("</SCRIPT> ")
Conclusion:
In this example, we can see that using JavaScript can call the form object action between webpages, making our Webpage Programs more humane.