当前位置: 首页 > wzjs >正文

班级优化大师官方网站公司建个网站要多少钱

班级优化大师官方网站,公司建个网站要多少钱,楚雄 公司 网站,梵克雅宝项链官网价格图片1.document主要是干什么的 文档对象模型(Document Object Model):在JS中获取html的元素进行修改,新增元素。 对于html页面来说它是由html head body div,from等标签组成,在js中将htnl的元素变成document(文档)进行管理&#xff0…
1.document主要是干什么的

文档对象模型(Document Object Model):在JS中获取html的元素进行修改,新增元素。

对于html页面来说它是由html head body div,from等标签组成,在js中将htnl的元素变成document(文档)进行管理,以上图来看 将document变成根节点,所以通过跟节点document来获取html中标签元素进行管理。

2.具体使用的方法:
HTML部分

  1)这个方法就是通过标签的id获取标签

      document.getElementById("")

  2)通过类名找到 HTML 元素

        document.getElementsByClassName("")

      通过标签名查找 HTML 元素

       var xId=document.getElementById("han-index");
       var xTr=xId.getElementsByTagName("td");

<div class="card-body"><table class="table table-bordered  table-hover"><thead class="thead-light text-center"><tr><th>流程点</th><th>操作人</th><th>业务名称</th><th>结果 <i class="fa fa-sort-amount-asc"></i></th><th>审核意见<i class="fa fa-sort-amount-desc"></i></th><th>操 作</th></tr></thead><tbody><tr id="han-index"><td>G3201900003</td><td title="2077531"><a>名称</a></td><td>操作人</td><td>结果</td><td>审核意见</td><td ><p id="showTime"></p><p id="showTime—one"></p><p id="showTime—two"></p></td></tr> </tbody></table>
</div><script>$(function () {document.getElementById("showTime").style.color = "blue"; // 修改文字颜色为蓝色//document.getElementById("showTime").id = "newId";document.getElementById("showTime—one").innerHTML="<h5 style='color:red'>您好,欢迎访问 我的博客</h5>";document.getElementById("showTime—two").innerText="您好,欢迎访问 我的博客";var xId=document.getElementById("han-index");//alert("xId: "+xId);var xTr=xId.getElementsByTagName("td");//alert("xTr: "+xTr);var x=document.getElementsByClassName("card-body");})
</script>			

 将新的html标签赋值当前标签

 3)对于innerHTML 来说可以识别htmL的标签

       document.getElementById(id).innerHTML=新的 HTML

   4) 对于innerText 只识别文本

       document.getElementById(id).innerText = 新的Text

CSS部分

1.document.getElementById(id).style.property=”新样式“;

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS样式</title>
</head><body><p id="p1">Hello World!</p><script>document.getElementById("p1").style.color="blue";document.getElementById("p1").style.fontFamily="Arial";document.getElementById("p1").style.fontSize="larger";</script><p>以上是CSS样式的调整</p></body>
</html>
2.JS对html事件进行反应

  1)onclick:οnclick=JS函数。onclick在触发事件。onclick可以在大部分标签中使用。

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>菜鸟教程(runoob.com)</title>
</head>
<body><p id="intro" onclick="this.innerHTML='转换!'">你好世界!</p>
大小写字母转换: <input type="text" id="fname" onchange="myFunction()">输入你的名字</body><script>
function myFunction(){var x=document.getElementById("fname");x.value=x.value.toUpperCase();
}
</script>
</html>

 2)onload 事件可用于检测访问者的浏览器类型和浏览器版本,并基于这些信息来加载网页的正确版本。

 3)onchange 事件常结合对输入字段的验证来使用。


常用属性列举

document.title                                  //设置文档标题等价于HTML的title标签

document.bgColor                                //设置页面背景色

document.fgColor                                //设置前景色(文本颜色)

document.linkColor                                //未点击过的链接颜色

document.alinkColor                                //激活链接(焦点在此链接上)的颜色

document.vlinkColor                                //已点击过的链接颜色

document.URL                                   //设置URL属性从而在同一窗口打开另一网页

document.fileCreatedDate                            //文件建立日期,只读属性

document.fileModifiedDate                           //文件修改日期,只读属性

document.fileSize                                //文件大小,只读属性

document.cookie                                 //设置和读出cookie

document.charset                               //设置字符集 简体中文:gb2312

———————————————————————

常用对象方法

document.write()                                               //动态向页面写入内容

document.createElement(Tag)                                         //创建一个html标签对象

document.getElementById(ID)                                        //获得指定ID值的对象

document.getElementsByName(Name)                                      //获得指定Name值的对象

document.getElementsByClassName(“className”)                      //获得指定class值的对象(数组)

document.getElementsByTagName(“TagName”)                         //获得指定Tag对象


文章转载自:

http://5rOq1EC0.hrypL.cn
http://Xs4EHkCQ.hrypL.cn
http://XZJUCxfL.hrypL.cn
http://bOydFdeV.hrypL.cn
http://PA6C8Plj.hrypL.cn
http://yuuy4AR3.hrypL.cn
http://JUd3YQmM.hrypL.cn
http://l258F8EP.hrypL.cn
http://RFB6zcVh.hrypL.cn
http://tTdS0d8K.hrypL.cn
http://zzFORHgJ.hrypL.cn
http://cfaQDGkx.hrypL.cn
http://4Fz4zWUl.hrypL.cn
http://tW4oBWDt.hrypL.cn
http://9Knsjj7G.hrypL.cn
http://dz04Etni.hrypL.cn
http://bLecwpRJ.hrypL.cn
http://IZ6lF7eP.hrypL.cn
http://nnSLmq4y.hrypL.cn
http://tgZz7iue.hrypL.cn
http://7MjPAMgb.hrypL.cn
http://Z6tXAAUF.hrypL.cn
http://bgSD1ath.hrypL.cn
http://OzTBF186.hrypL.cn
http://RS8566P8.hrypL.cn
http://wCJ53yoj.hrypL.cn
http://QCiMXGfR.hrypL.cn
http://5yYo9vZd.hrypL.cn
http://Vfwn6WKq.hrypL.cn
http://ExbQIL2e.hrypL.cn
http://www.dtcms.com/wzjs/635629.html

相关文章:

  • 做游戏网站教程企业营业执照
  • 合肥网站的建设记事本做的网站链接怎么装饰
  • .net网站制作综合实训报告网站建设常识网站建设技术知识大全
  • 安徽省建设工程信息网站6装宽带需要多少钱
  • 北京公司网站制作价格开一家网络公司需要什么条件
  • 番禺做网站600元吴江网络推广
  • 全球外贸网站制作教程软文写作的基本要求
  • 萍乡网站开发iosapp开发工具
  • 长沙哪里做网站好知末网官网
  • 外贸网站能用阿里云吗新乡网站seo
  • 北京做网站最好的公司做网站交互
  • 快速搭建网站服务器重庆娱乐场所最新通知
  • 第一次做网站选多大空间网站开发介绍ppt
  • 中堂镇做网站网络推广营销公司
  • 万户网络网站顾问网站备案号不存在
  • 网站开发团队人员网站架构怎么做
  • 怎样设置网站西安专业的网站设计费用
  • 有域名有服务器怎么建站网络优化工程师有多累
  • 网站开发需要考什么证wordpress project
  • 帝国cms7.0网站搬家换域名换空间等安装教程品牌建设对企业的作用
  • 能够做物理题的网站网站开发专业培训学校
  • 康保网站制作网站建设 pdf教程
  • 做视频特技的网站百度服务中心人工24小时电话
  • 网站建设运营费用包括哪些软件开发用什么软件
  • 帝国cms 网站地址设置网页设计师培训课程多少钱
  • 常州建设银行新北分行网站新网seo关键词优化教程
  • 做网站需要知道什么软件东莞网站建设手袋加工
  • 织梦手机网站怎么修改wordpress 板块
  • 企业门户网站建设管理制度比较好的网页网站设计
  • 大型网站建设技巧网站建设的栏目内容是