alert(1);" method; 2. Introduce external JavaScript script files."/> alert(1);" method; 2. Introduce external JavaScript script files.">

Home  >  Article  >  Web Front-end  >  Can JavaScript be written in jsp?

Can JavaScript be written in jsp?

藏色散人
藏色散人Original
2021-07-01 11:06:404008browse

JavaScript can be written in jsp. The writing methods are: 1. "4ec11beb6c39d0703d1751d203c17053alert(1);2cacc6d41bbb37262a98f745aa00fbf0" method; 2. Introducing external JavaScript scripts document.

Can JavaScript be written in jsp?

The operating environment of this article: windows7 system, javascript version 1.8.5, DELL G3 computer

Can JavaScript be written in jsp?

Javascript scripts can be written in jsp pages.

In fact, there is no difference between writing javascript scripts in jsp pages and writing javascript scripts in HTML pages; you need to use script tags.

There are two ways to write JavaScript scripts in JSP pages:

1. Write directly

<script type="text/javascript">
   alert(1);
</script>

2. Introduce external JavaScript script files into HTML pages

Write the JavaScript script in the js file and then introduce it into the HTML page.

<script type="text/javascript" src="json.js" ></script>

Recommended study: "javascript Advanced Tutorial"

The above is the detailed content of Can JavaScript be written in jsp?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn