网页中三种注释的区别

注释快键键  ctrl + /

//所注释的是script中的代码

/* */所注释的是style中的代码

<!--   -->所注释的是html标签中的代码

代码如下:

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script> 
		//alert(date.getMonth());
	</script>
	<style type="text/css">
		/*123*/
	</style>
</head>
<body>
	<!-- 456 -->
</body>
</html>

猜你喜欢

转载自blog.csdn.net/qq_41376345/article/details/86028458