Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
What Is a Script Tag/Element
What Is a Script Tag/Element? - XHTML 1.0 Tutorials - Document Structure and Head Level Tags
✍: FYIcenter.com
A "script" element is an optional sub-element of the "head" and many other XHTML elements. If a "script" element is placed inside the "head" element, the specified script code will not be executed immediately.
Usually, you use "script" elements in the "head" element to define script functions. and use other "script" elements in the "body" element to call those functions. Here is good example of a script element:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>My First Script Document</title>
<script type="text/javascript">
function hello() {
alert("Hello world!?");
}
</script>
</head>
<body>
<p><script type="text/javascript">
hello();
</script></p>
</body>
</html>
If you save the above document as hello.html, and view it with Internet Explorer, you will see a small dialog box showing up.
2007-05-12, 4933👍, 0💬
Popular Posts:
What is CodeDom? “CodeDom” is an object model which represents actually a source code. It is designe...
Describe different elements in Static Chart diagrams ? Package: - It logically groups element of a U...
What is the value of this expression? +1-2*3/4 -0.5
How do we enable SQL Cache Dependency in ASP.NET 2.0? Below are the broader steps to enable a SQL Ca...
If client side validation is enabled in your Web page, does that mean server side code is not run? W...