ȥå   Խ ʬ Хåå ź ʣ ̾ѹ   ñ측 ǽ   إ   ǽRSS

JavaScript

Last-modified: 2016-10-29 () 08:57:47 (326d)
Top / JavaScript

ƥץ졼

HTML 5ǤäȻȤΥƥץ졼

<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>JavaScriptƥ</title>
</head>



<body>
<script>
<!--
	document.write('Hello, world!<br>');
//-->
</script>
<noscript>JavaScriptѤǤޤ</noscript>
</body> 
</html>

UTF-8¸Ƥ

ʰŪHTML 4ǤäȻȤΥƥץ졼

<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>JavaScriptƥ</title>
</head>



<body>
<script type="text/javascript">
<!--
	document.write('Hello, world!<br>');
//-->
</script>
<noscript>JavaScriptѤǤޤ</noscript>
</body>
</html>

UTF-8¸Ƥ
͡DOCTYPEդHTML 4Ȥʤޤ

ˡ

̥ե˵Ҥˡ

HTML5

<script src="js/foo.js"></script>

HTML4.01, XHTML

<script type="text/javascript" src="js/foo.js" charset="UTF-8"></script>

ʸɤ㤦ϤΤ褦charasetꤷޤ

HTMLեˤޤȤƵҤˡ

<script type="text/javascript">
<!--
	˥ɤ򵭽Ҥޤ
//-->
</script>
<noscript>ѤδĶǤJavaScriptưޤ
ΥڡJavaScriptѤƤޤΤǡǽѤޤ</noscript>

ץȤȤʤϡʬ<!-- ... -->ˤäƥȤȤɽʤ褦ˤƤޤ

XHTMLեˤޤȤƵҤˡ

<script type="text/javascript">
//<![CDATA[
	˥ɤ򵭽Ҥޤ
//]]>
</script>
<noscript>ѤδĶǤJavaScriptưޤ
ΥڡJavaScriptѤƤޤΤǡǽѤޤ</noscript>

XHTMLǤ<!-- -->Ѥ˥ȤȤʤꥹץȤ¹ԤʤʤޤΤǡ<![CDATA[ ... ]]>ˤäƥץȤϤޤץȤ֥饦Ǥ//ǤΰϤȤ̵Ȥޤ

Υ٥ȥϥɥ°ľܵҤˡ

<iframe src="http://mainichi.jp/" width="1024" height="768" scrolling="auto" frameborder="1" onLoad="alert('loaded')">
</iframe>

ahrefľܵҤˡ

<a href="JavaScript:window.alert('Hello, world!');">ɽ</a>