An easy way to write JavaScript code to client execution using ASP ...

Source: Internet
Author: User
Recently wrote a small program, is the data in the database in the form of a tree graph to the client's browser, which uses ASP to remove data from the database, and then use JavaScript to display the data in a tree graph to the client.
When writing the above code, it's a hassle to write JavaScript code into a Web page with ASP. If you use the Response.Write method, the code that you write will look messy and often has errors. After testing, summed up the following method, we can try:
<%= "<script language= ' JavaScript ' >"%>
Window.opener.frm.show_branch.value= "";
Window.opener.frm.show_branch.value= "<%=request.querystring" ("type")%> ";
Window.opener.frm.branch_belong.value= "<%=request.querystring" ("type")%> ";
Window.close ();
</SCRIPT>
It's simple! The key is in the code <%= "<script language= ' JavaScript ' >"%>.
If there is an incorrect place, also hope to advise!!
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.