html 基础操作 css js

运行: Control + R
保存: Control + S
注释:Control + /

表格标签
table:定义表格
tr:定义行
td:定义列

div:块标签

引入css文件      href
<link rel="stylesheet" href="css/style.css" type="text/css"/>

<link rel="stylesheet" type="text/css" href="css/style.css"/>

<!--form表单里面一般放置input标签-->
<!--普通的输入框-->
<!--placeholder提示语 value默认值-->

<!--method:表单提交方式-->
<!--action:表单信息提交地址-->
eg:<form method="post" action="http://127.0.0.1:8001/post.php">

<style type="text/css">
/*css语言*/
</style>

<link rel="stylesheet" type="text/css" href="css/style.css"/>

<script type="text/javascript">
console.log("我是head中的输出");
</script>

<!--src属性为引入js文件的路径-->
<script type="text/javascript" src="js/firstJS.js">

<!--一般情况下,script不写在head标签中,因为写在head中的script
会在body加载之前就执行,导致一些写在script中的效果出不来-->
<!--一般写在head中的scrpit标签,都是引入外部的js文件-->
<!--src属性为引入js文件的路径-->
<script type="text/javascript" src="js/firstJS.js">
//当script标签有src属性时,其开始标签与闭合标签中的js语句不再执行
console.log("我就是不能输出");
</script>

控制台输出语句

console.log("hello world");

浏览器提示框
alert("这是我自己创建的提示框");

//页面输出
document.write("我是通过write写出来的文字");

猜你喜欢

转载自www.cnblogs.com/lichunyan58/p/9097440.html