首页 > Web开发 > 详细

HTML格式基础

时间:2016-11-07 19:59:17      阅读:165      评论:0      收藏:0      [点我收藏+]

<html>

  <head>

    <style type="text/css">  

      .class{color:red;}  类选择器

      #id {color:red;} id选择器

      #id p{} id元素下面的所有p标签

      #id >p{} 直属下层的p

      #test +p{} 同级下一个p

       

    <style>

    <link rel="stylesheet" type="text/css" href=""/> 外部样式

    <script type="text/javascript">

    </script>

    <script type="text/javascript" src=""></script> 外部js

  </head>

  <body> 

  </body>

</html>


(function(){})()  自执行函数,页面加载自动会先执行函数

字符处理:obj.trim 去掉空格

obj.charAt()找到字符串的第几个字符

obj.lenth()长度

切割字符串 obj.substring()



HTML格式基础

原文:http://9408347.blog.51cto.com/9398347/1870296

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!