Categories:
.NET (961)
C (387)
C++ (185)
CSS (84)
DBA (8)
General (31)
HTML (48)
Java (641)
JavaScript (220)
JSP (109)
JUnit (31)
MySQL (297)
Networking (10)
Oracle (562)
Perl (48)
Perl (9)
PHP (259)
PL/SQL (140)
RSS (51)
Software QA (28)
SQL Server (5)
Struts (20)
Unix (2)
Windows (3)
XHTML (199)
XML (59)
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, 4507👍, 0💬
Popular Posts:
How To Enter a New Row into a Table Interactively? - Oracle DBA FAQ - Introduction to Oracle SQL Dev...
What is ISO? ISO 9000 is a family of standards for quality management systems. ISO 9000 is maintaine...
How can I execute a PHP script using command line? Just run the PHP CLI (Command Line Interface) pro...
What is the difference between delegate and events? ã Actually events use delegates in bottom. But ...
How To Merge Values of Two Arrays into a Single Array? - PHP Script Tips - PHP Built-in Functions fo...