日期:2014-05-16 浏览次数:20319 次
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Inline JavaScript</title> </head> <body> <h1>Inline Example</h1> <script type="text/javascript"> //JavaScript代码 </script> </body> </html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Head JavaScript</title> <script type="text/javascript"> //JavaScript代码 </script> </head> <body> <h1>Head Example</h1> </body> </html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>External File JavaScript</title> <script type="text/javascript" src="source.js"></script> </head> <body> <h1>External File Example</h1> </body> </html>