JavaScript 注释

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>JavaScript 注释</title>
</head>
<body>
	<script type="text/javascript">
		var a,b,c;
		// 单行注视
		/*
			多行注视
		*/
		a = "xhtml";
		b = "css";
		c = "JavaScript";
		alert(a+" "+b+" "+c);
	</script>
</body>
</html>


单行注释用 //

多行注视用 /**/

另外注意的是 在注释的代码中有的时候需要删除汉字,否则会出错。

Meet so Meet. C plusplus I-PLUS....
原文地址:https://www.cnblogs.com/iplus/p/4490031.html