JavaScript 基础

js hello world

  1. 三种输出方式
  2. js编写位置
  3. js中的注释
  4. 使用var 定义变量名称
  5. 如何定义标识符
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>js hello world </title>
		<script type="text/jscript">
			//三种输出方式
			alert("hello js 从入门到放弃");
			console.log("js 代码块中写日志");
			document.write("js 代码块中写内容");
			
			//js的编写位置
			/**
			 * 1. 使用外部js文件,通过 script 标签引入
                    
                    

你可能感兴趣的:(javascript,前端,开发语言)