资讯专栏INFORMATION COLUMN

html标签简介(常用)

Travis / 3123人阅读

摘要:比如等行内标签可以多个标签共同占用一行的标签。标准模式,浏览器使用的标准解析渲染页面。显示结果这个文本包含下标文本。表单提交项的值。表单还可以包含和标签。

html常识

什么是HTML

  • htyper text markup language  即超文本标记语言
  • 超文本: 就是指页面内可以包含图片、链接,甚至音乐、程序等非文字元素。
  • 标记语言: 标记(标签)构成的语言.
  • 网页==HTML文档,由浏览器解析,用来展示的
  • 静态网页:静态的资源,如xxx.html
  • 动态网页:html代码是由某种开发语言根据用户请求动态生成的

什么是标签

  • 是由一对尖括号包裹的单词构成 例如: *所有标签中的单词不可能以数字开头.
  • 标签不区分大小写. 和 . 推荐使用小写.
  • 标签分为两部分: 开始标签 和 结束标签. 两个标签之间的部分 我们叫做标签体.
  • 有些标签功能比较简单.使用一个标签即可.这种标签叫做自闭和标签.例如:

  • 标签可以嵌套.但是不能交叉嵌套.

标签属性

  • 通常是以键值对形式出现的. 例如 name="aaron"
  • 属性只能出现在 开始标签自闭和标签中.
  • 属性名字全部小写. *属性值必须使用双引号或单引号包裹 例如 name="aaron"
  • 如果属性值和属性名完全一样.直接写属性名即可. 例如 readonly

标签分类

  标签一般分为两种:

  1. 块级标签

    霸占一整行的标签。比如:,

,

,

  2. 行内标签

    可以多个标签共同占用一行的标签。比如:,,,

  • 总是在新行上开始
  • 宽度缺省是它的容器的100%,除非设定一个宽度
  • 它可以容纳内联元素和其他块元素

  4. 行内标签特点

  • 和其他元素都在一行上
  • 宽度就是它的文字或图片的宽度,不可改变
  • 内联元素只能容纳文本或者其他内联元素

特殊字符

      < >;";©®

html文件结构

标签使用范围说明

  由上图可以看出,html文件主要由标签标签组成。在这两个标签的标签体中能够嵌套如下标签:

  • 标签:      <link>  <style>  <script>  </li> <li><strong>其余标签都在<body>标签中嵌套</strong></li> </ul> <h1><!DOCTYPE html>标签</h1> <p>      由于历史的原因,各个浏览器在对页面的渲染上存在差异,甚至同一浏览器在不同版本中,对页面的渲染也不同。在W3C标准出台以前,浏览器在对页面的渲染上没有统一规范,产生了差异(<strong>Quirks mode</strong>或者称为<strong>Compatibility Mode</strong>);</p> <p>      由于W3C标准的推出,浏览器渲染页面有了统一的标准(<strong>CSScompat</strong>或称为<strong>Strict mode</strong>也有叫做<strong>Standarsmode</strong>),这就是二者最简单的区别。</p> <p>      W3C标准推出以后,浏览器都开始采纳新标准,但存在一个问题就是如何保证旧的网页还能继续浏览,在标准出来以前,很多页面都是根据旧的渲染方法编写的,如果用的标准来渲染,将导致页面显示异常。为保持浏览器渲染的兼容性,使以前的页面能够正常浏览,浏览器都保留了旧的渲染方法(如:微软的IE)。这样浏览器渲染上就产生了Quircks mode和Standars mode,两种渲染方法共存在一个浏览器上。</p> <pre class="brush:csharp;gutter:true;">window.top.document.compatMode: //BackCompat:怪异模式,浏览器使用自己的怪异模式解析渲染页面。 //CSS1Compat:标准模式,浏览器使用W3C的标准解析渲染页面。 </pre> <p>      这个属性会被浏览器识别并使用,但是如果你的页面没有DOCTYPE的声明,那么compatMode默认就是BackCompat,这也就是恶魔的开始 -- 浏览器按照自己的方式解析渲染页面,那么,在不同的浏览器就会显示不同的样式。</p> <p>      如果你的页面添加了<!DOCTYPE html>那么,那么就等同于开启了标准模式,那么浏览器就得老老实实的按照W3C的标准解析渲染页面,这样一来,你的页面在所有的浏览器里显示的就都是一个样子了。</p> <p>      这就是<!DOCTYPE html>的作用。</p> <h1><meta>标签</h1> <p>  有两个属性:http-equiv属性 和  name属性,不同属性有不同的参数,这些不同的参数使得名,meta标签有不同的功能。</p> <h2>http-equiv属性</h2> <p>  http-equiv顾名思义,相当于http的文件头作用,它可以向浏览器传回一些有用的信息,以帮助正确和精确地显示网页内容,与之对应的属性值为content,content中的内容其实就是各个参数的变量值。 </p> <ul> <li>页面编码</li> </ul> <pre class="brush:html;gutter:true;"><meta http-equiv="content-Type" charset=UTF8"> </pre> <ul> <li>页面刷新和跳转</li> </ul> <pre class="brush:html;gutter:true;"><meta http-equiv="Refresh"Content="30"> 每隔30秒刷新一次网页 <meta http-equiv="Refresh"Content="5;Url=http://www.baidu.com"> 过5秒跳转到某网页。(关于跳转,可以在应急的时候用,一般可以用js实现) </pre> <ul> <li>解决IE浏览器兼容性问题</li> </ul> <pre class="brush:html;gutter:true;"><meta http-equiv = "X-UA-Compatible" content = "IE=EmulateIE7" /> </pre> <h2>name属性</h2> <p>   name属性主要用于描述网页,与之对应的属性值为content,content中的内容主要是便于搜索引擎机器人查找信息和分类信息用的。</p> <ul> <li>供搜索引擎使用(关键词)</li> </ul> <pre class="brush:html;gutter:true;"><meta name="keywords" content="星际2,飞船,UFO,皮卡"> 关键字 </pre> <ul> <li> 网站信息描述</li> </ul> <pre class="brush:html;gutter:true;"><meta name="description" content="为您提供最新的信息"> 网站描述 </pre> <h1><title>标签</h1> <p>  title标签写网站头部信息,即网页标签的名称</p> <h1><span style="font-size: 16px;"><link>标签</span></h1> <p>  link标签有两个作用:</p> <h2>1.设置标签页图标:</h2> <pre class="brush:html;gutter:true;"><link rel="shortcut icon" href="image/favicon.ico"> # rel指的是类型,href是文件路径,(image是存放图片的文件夹) </pre> <h2>2.外联CSS文件:</h2> <pre class="brush:html;gutter:true;"><link rel="stylesheet" type="text/css" href="css/common.css"> # rel指的是类型,href是存放css文件的文件夹 </pre> <h1> <style>标签</h1> <p>  在html文件中编写css样式</p> <h1><script>标签</h1> <h2>1.引进文件</h2> <pre class="brush:html;gutter:true;"><script type="text/javasvript" src="http://www.googletagservices.com/tag/js/gpt.js"></script> </pre> <h2>2.写js代码</h2> <pre class="brush:html;gutter:true;"> </pre> <h1>基本标签</h1> <pre class="brush:html;gutter:true;"><hn>:n的取值范围是1~6; 从大到小. 用来表示标题. <p>:段落标签. 包裹的内容被换行.并且也上下内容之间有一行空白. <b> <strong>:加粗标签. <strike>:为文字加上一条中线. <em>:文字变成斜体. <sup>和<sub>:上角标 和 下角表. <br>:换行. <hr>:水平线 <div>:白板,本身没有特性,块级标签。 <span>:白板,本身没有特性,行内标签。 </pre> <h2> <sup>和<sub>的使用</h2> <pre class="brush:html;gutter:true;"><p>这个文本包含 <sub>下标</sub>文本。</p> <p>这个文本包含 <sup>上标</sup> 文本。</p> </pre> <p>  显示结果:</p> <p>  这个文本包含 <sub>下标</sub>文本。</p> <p>  这个文本包含 <sup>上标</sup> 文本。</p> <h1><input>标签</h1> <h2>type属性</h2> <p>  可以有如下取值:</p> <pre class="brush:html;gutter:true;">text 文本输入框 password 密码输入框 radio 单选框 checkbox 多选框 submit 提交按钮 button 按钮(需要配合js使用.) button和submit的区别? file 提交文件:form表单需要加上属性enctype="multipart/form-data" </pre> <h2 align="left">name属性</h2> <ul> <li>表单提交项的键。</li> <li>注意和id属性的区别:name属性是和服务器通信时使用的名称;而id属性是浏览器端使用的名称,该属性主要是为了方便客户端编程,而在css和javascript中使用的。</li> </ul> <h2>value属性</h2> <p>  表单提交项的值。</p> <h2>checked属性</h2> <p>   radio 和 checkbox 默认被选中</p> <h2>readonly属性</h2> <p>  只读,text 和 password 标签中使用</p> <h2>disabled属性</h2> <p>  使得input标签无法编辑,对所用的input标签都有效</p> <h1> <textarea>标签</h1> <p>文本域标签,有如下三个属性:</p> <pre class="brush:html;gutter:true;">name: 表单提交项的键. cols: 文本域默认有多少列 rows: 文本域默认有多少行 </pre> <h1> <label>标签</h1> <pre class="brush:html;gutter:true;"><label for="xxx">姓名</label> <input id="xxx" type="text"> </pre> <p>   当label标签通过for属性与其他标签的id属性关联时,点击label标签的标签体时,会自动响应label标签所关联的标签</p> <h1><select>标签</h1> <p>  选择框,有如下属性:</p> <pre class="brush:html;gutter:true;">name: 表单提交项的键。<br />value:表单提交项的值。 size:选项个数 multiple:multiple <br />selectted:默认选择项 </pre> <p><span>   如果属性设置multiple="multiple" size="3",表示选择框只能同时显示三项。<option>内的 value 为后台识别,innerText为文本内容。</span></p> <pre class="brush:html;gutter:true;"><p>选择你的地址</p> <select name="city"> <option value="1" selected="selected">北京</option> <!-- selected 默认选项 --> <option value="2">深圳</option> <option value="3">上海</option> <option value="4">杭州</option> <option value="5">成都</option> </select> </pre> <pre class="brush:html;gutter:true;"><p>请选择籍贯</p> <select name="jiguan"> <optgroup label="河北省"> <option value="1">石家庄</option> <option value="2">保定</option> <option value="3">邯郸</option> </optgroup> <optgroup label="湖南"> <option>长沙</option> <option>株洲</option> <option>湘潭</option> </optgroup> <optgroup label="广东"> <option>广州</option> <option>深圳</option> <option>佛山</option> <option>珠海</option> <option>中山</option> </optgroup> </select> </pre> <h1> <form>标签</h1> <ul> <li>表单用于向服务器传输数据。</li> <li>表单能够包含 input 元素,比如文本字段、复选框、单选框、提交按钮等等。</li> <li>表单还可以包含textarea、select、fieldset和 label 标签。</li> </ul> <h2> action属性</h2> <p>  表单提交到哪. 一般指向服务器端一个程序,程序接收到表单提交过来的数据(即表单元素值)作相应处理,比如https://www.sogou.com/web</p> <h2>method属性</h2> <p>  表单的提交方式 post/get 。 默认取值就是 get。</p> <pre class="brush:html;gutter:true;">get: 1. 提交的键值对.放在地址栏中url后面. 2. 安全性相对较差. 3.对提交内容的长度有限制. post: 1. 提交的键值对 不在地址栏. 2. 安全性相对较高. 3. 对提交内容的长度理论上无限制. get/post是常见的两种请求方式. </pre> <h2> enctype属性</h2> <p>当上传文件时,form标签必须添加该属性,而且还必须已post方式发送请求</p> <pre class="brush:html;gutter:true;">enctype="multipart/form-data" </pre> <h1> <a>标签</h1> <p>  有两个作用:</p> <ul> <li>作超链接:跳转到指定url</li> </ul> <pre class="brush:html;gutter:true;"><a href="http://www.baidu.com" target="_blank" title="点一下看看啊">你好</a> </pre> <ul> <li>作锚点:条转到指定id</li> </ul> <pre class="brush:html;gutter:true;"><a href="#i1">第一章</a> <a href="#i2">第二章</a> <a href="#i3">第三章</a> <a href="#i4">第四章</a> <a href="#i5">第五章</a> <div id="i1" style="height:600px;">第一章的内容 <p>绪论</p></div> <div id="i2" style="height:600px;">第二章的内容 <p>公元500年</p></div> <div id="i3" style="height:600px;">第三章的内容 <p>公园1000年</p></div> <div id="i4" style="height:600px;">第四章的内容 <p>公元1900年</p></div> <div id="i5" style="height:600px;">第五章的内容 <p>公元2010年</p></div> </pre> <p> <strong>注意:</strong><a>标签默认的显示样式会有下划线,如果看着不爽想要去掉,在a标签样式中设置:text-decoration:none;</p> <h1></p> <pre class="brush:html;gutter:true;"><h4>单元格跨两列:</h4> <table border="1"> <tr> <th>First Name:</th> <td>Bill Gates</td> </tr> <tr> <th rowspan="2">Telephone:</th> <td>555 77 854</td> </tr> <tr> <td>555 77 855</td> </tr> </table> </pre> <p> </p> <p> </p> </div> <div class="mt-64 tags-seach" > <div class="tags-info"> <a style="width:120px;" title="idc机房托管" href="https://www.ucloud.cn/site/product/uxzone.html">idc机房托管</a> <a style="width:120px;" title="私有云" href="https://www.ucloud.cn/site/product/ucloudstack.html">私有云</a> <a style="width:120px;" title="网页html标签简介" href="https://www.ucloud.cn/yun/tag/wangyehtmlbiaoqianjianjie/">网页html标签简介</a> <a style="width:120px;" title="html常用标签" href="https://www.ucloud.cn/yun/tag/htmlchangyongbiaoqian/">html常用标签</a> <a style="width:120px;" title="html常用单标签" href="https://www.ucloud.cn/yun/tag/htmlchangyongdanbiaoqian/">html常用单标签</a> <a style="width:120px;" title="html基本常用标签" href="https://www.ucloud.cn/yun/tag/htmljibenchangyongbiaoqian/">html基本常用标签</a> </div> </div> <div class="entry-copyright mb-30"> <p class="mb-15"> 文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。</p> <p>转载请注明本文地址:https://www.ucloud.cn/yun/1857.html</p> </div> <ul class="pre-next-page"> <li class="ellipsis"><a class="hpf" href="https://www.ucloud.cn/yun/1856.html">上一篇:MySql+Socket 完成数据库的增查Demo</a></li> <li class="ellipsis"><a class="hpf" href="https://www.ucloud.cn/yun/1858.html">下一篇:Hexo使用细节及各种问题</a></li> </ul> </div> <div class="about_topicone-mid"> <h3 class="top-com-title mb-0"><span data-id="0">相关文章</span></h3> <ul class="com_white-left-mid atricle-list-box"> <li> <div class="atricle-list-right"> <h2 class="ellipsis2"><a class="hpf" href="https://www.ucloud.cn/yun/99449.html"><b>前端修炼の道 | <div> <em>标签</em><em>简介</em></b></a></h2> <p class="ellipsis2 good">摘要:标签是最基本的,同时也是最常用的标签。该标签是一个双标签,出现在主体区域中,主要作为一个容器标签来使用,在标签中可以包含除之外的所有主体标签。因此,的主要作用就是用来对结构进行布局。示例标签的使用上述代码中,分别创建了两个块级元素。 showImg(https://segmentfault.com/img/bVbj9Kn?w=900&h=383); 标签是最基本的,同时也是最常用的标...</p> <div class="com_white-left-info"> <div class="com_white-left-infol"> <a href="https://www.ucloud.cn/yun/u-795.html"><img src="https://www.ucloud.cn/yun/data/avatar/000/00/07/small_000000795.jpg" alt=""><span class="layui-hide64">vvpale</span></a> <time datetime="">2019-08-23 13:43</time> <span><i class="fa fa-commenting"></i>评论0</span> <span><i class="fa fa-star"></i>收藏0</span> </div> </div> </div> </li> <li> <div class="atricle-list-right"> <h2 class="ellipsis2"><a class="hpf" href="https://www.ucloud.cn/yun/1674.html"><b><em>html</em>学习</b></a></h2> <p class="ellipsis2 good">摘要:要养成良好的编写注释习惯。十六进制满进只能用标志使用分别表示八进制满进。。。。字符集编码和解码所采用的规则,我们称为为字符集产生乱码原因编码和解码采用的字符集不同。如果同时制定宽度和高度,图像比例会发生变化。什么是HTML? HTML:超文本标记语言。 所谓超文本也就是超链接,可以让我们从一个网页跳转到另一个网页。 HTML基本格式 ...</p> <div class="com_white-left-info"> <div class="com_white-left-infol"> <a href="https://www.ucloud.cn/yun/u-695.html"><img src="https://www.ucloud.cn/yun/data/avatar/000/00/06/small_000000695.jpg" alt=""><span class="layui-hide64">YPHP</span></a> <time datetime="">2019-04-23 13:17</time> <span><i class="fa fa-commenting"></i>评论0</span> <span><i class="fa fa-star"></i>收藏0</span> </div> </div> </div> </li> <li> <div class="atricle-list-right"> <h2 class="ellipsis2"><a class="hpf" href="https://www.ucloud.cn/yun/53104.html"><b>JavaWEB开发01——<em>HTML</em></b></a></h2> <p class="ellipsis2 good">摘要:网站信息页面需求分析我们公司的需要一个对外宣传的网站介绍介绍公司的主要业务公司的发展历史公司的口号等等信息技术分析概述超文本标记语言超文本比普通文本功能更加强大可以添加各种样式标记语言通过一组标签来对内容进行描述关键字是由浏览器来解释执行静 1.网站信息页面 1.1需求分析: 我们公司的需要一个对外宣传的网站介绍,介绍公司的主要业务,公司的发展历史,公司的口号等等信息 1.2技术分析:...</p> <div class="com_white-left-info"> <div class="com_white-left-infol"> <a href="https://www.ucloud.cn/yun/u-1313.html"><img src="https://www.ucloud.cn/yun/data/avatar/000/00/13/small_000001313.jpg" alt=""><span class="layui-hide64">IntMain</span></a> <time datetime="">2019-08-02 11:46</time> <span><i class="fa fa-commenting"></i>评论0</span> <span><i class="fa fa-star"></i>收藏0</span> </div> </div> </div> </li> <li> <div class="atricle-list-right"> <h2 class="ellipsis2"><a class="hpf" href="https://www.ucloud.cn/yun/122442.html"><b>保姆级教程<em>HTML</em>两万字笔记大总结【建议收藏】(上篇)</b></a></h2> <p class="ellipsis2 good">摘要:标签不区分大小写,但推荐小写。标签可以嵌套,但不能交叉嵌套。标签也称为元素。比如行内标签亦可成行内元素。 ❤️HTML必备知识详解❤️ 第一部分:HTML框架简介...</p> <div class="com_white-left-info"> <div class="com_white-left-infol"> <a href="https://www.ucloud.cn/yun/u-668.html"><img src="https://www.ucloud.cn/yun/data/avatar/000/00/06/small_000000668.jpg" alt=""><span class="layui-hide64">paulli3</span></a> <time datetime="">2021-10-13 09:40</time> <span><i class="fa fa-commenting"></i>评论0</span> <span><i class="fa fa-star"></i>收藏0</span> </div> </div> </div> </li> <li> <div class="atricle-list-right"> <h2 class="ellipsis2"><a class="hpf" href="https://www.ucloud.cn/yun/27576.html"><b>Docker<em>简介</em>、<em>常用</em>命令与实践(二)</b></a></h2> <p class="ellipsis2 good">摘要:上一篇简介常用命令与实践一六镜像操作获取镜像下载镜像到本地上有大量的高质量的镜像可以用,这里我们就说一下怎么获取这些镜像。 【上一篇:Docker简介、常用命令与实践(一)】 六、Docker镜像操作 6.1 获取镜像(下载镜像到本地) Docker Hub 上有大量的高质量的镜像可以用,这里我们就说一下怎么获取这些镜像。从 Docker 镜像仓库获取镜像的命令是 docker pul...</p> <div class="com_white-left-info"> <div class="com_white-left-infol"> <a href="https://www.ucloud.cn/yun/u-124.html"><img src="https://www.ucloud.cn/yun/data/avatar/000/00/01/small_000000124.jpg" alt=""><span class="layui-hide64">mykurisu</span></a> <time datetime="">2019-06-28 16:49</time> <span><i class="fa fa-commenting"></i>评论0</span> <span><i class="fa fa-star"></i>收藏0</span> </div> </div> </div> </li> </ul> </div> <div class="topicone-box-wangeditor"> <h3 class="top-com-title mb-64"><span>发表评论</span></h3> <div class="xcp-publish-main flex_box_zd"> <div class="unlogin-pinglun-box"> <a href="javascript:login()" class="grad">登陆后可评论</a> </div> </div> </div> <div class="site-box-content"> <div class="site-content-title"> <h3 class="top-com-title mb-64"><span>0条评论</span></h3> </div> <div class="pages"></ul></div> </div> </div> <div class="layui-col-md4 layui-col-lg3 com_white-right site-wrap-right"> <div class=""> <div class="com_layuiright-box user-msgbox"> <a href="https://www.ucloud.cn/yun/u-1120.html"><img src="https://www.ucloud.cn/yun/data/avatar/000/00/11/small_000001120.jpg" alt=""></a> <h3><a href="https://www.ucloud.cn/yun/u-1120.html" rel="nofollow">Travis</a></h3> <h6>男<span>|</span>高级讲师</h6> <div class="flex_box_zd user-msgbox-atten"> <a href="javascript:attentto_user(1120)" id="attenttouser_1120" class="grad follow-btn notfollow attention">我要关注</a> <a href="javascript:login()" title="发私信" >我要私信</a> </div> <div class="user-msgbox-list flex_box_zd"> <h3 class="hpf">TA的文章</h3> <a href="https://www.ucloud.cn/yun/ut-1120.html" class="box_hxjz">阅读更多</a> </div> <ul class="user-msgbox-ul"> <li><h3 class="ellipsis"><a href="https://www.ucloud.cn/yun/124407.html">等级保护对象是指什么?是指整个单位吗?</a></h3> <p>阅读 2032<span>·</span>2021-11-23 09:51</p></li> <li><h3 class="ellipsis"><a href="https://www.ucloud.cn/yun/122962.html">Database Mart:黑五大促预告,众多产品参与,最高达60%优惠,常规美国GPU服务器,月付</a></h3> <p>阅读 3530<span>·</span>2021-11-11 10:57</p></li> <li><h3 class="ellipsis"><a href="https://www.ucloud.cn/yun/121954.html">SPI总线协议</a></h3> <p>阅读 1208<span>·</span>2021-10-09 09:43</p></li> <li><h3 class="ellipsis"><a href="https://www.ucloud.cn/yun/121529.html">适合女生学的技术有哪些?</a></h3> <p>阅读 2232<span>·</span>2021-09-29 09:35</p></li> <li><h3 class="ellipsis"><a href="https://www.ucloud.cn/yun/117075.html">移动开发中固定布局</a></h3> <p>阅读 1808<span>·</span>2019-08-30 15:54</p></li> <li><h3 class="ellipsis"><a href="https://www.ucloud.cn/yun/116127.html">CSS之flexbox指南</a></h3> <p>阅读 1684<span>·</span>2019-08-30 15:44</p></li> <li><h3 class="ellipsis"><a href="https://www.ucloud.cn/yun/115478.html">div+css图片列表布局(一)</a></h3> <p>阅读 3034<span>·</span>2019-08-30 13:20</p></li> <li><h3 class="ellipsis"><a href="https://www.ucloud.cn/yun/114915.html">React的移动端和PC端生态圈的使用汇总</a></h3> <p>阅读 1587<span>·</span>2019-08-30 11:19</p></li> </ul> </div> <!-- 云社区相关服务 --> <div class="com_layuiright-box"> <h3 class="top-com-title"><span>云社区相关服务</span></h3> <div class="community-box flex_box flex_wrap community-box1"> <a href="https://www.ucloud.cn/yun/question/add.html" rel="nofollow"> <img src="https://www.ucloud.cn/yun/static/theme/ukd/images/topicone-icon1.png" alt="提问"> <span>提问</span> </a> <a href="https://www.ucloud.cn/yun/article" rel="nofollow"> <img src="https://www.ucloud.cn/yun/static/theme/ukd/images/topicone-icon2.png" alt="学习"> <span>学习</span> </a> <a href="https://www.ucloud.cn/yun/user/vertify.html" rel="nofollow"> <img src="https://www.ucloud.cn/yun/static/theme/ukd/images/topicone-icon4.png" alt="认证"> <span>认证</span> </a> <a href="https://www.ucloud.cn/site/product/uhost.html?ytag=seo" rel="nofollow"> <img src="https://www.ucloud.cn/yun/static/theme/ukd/images/topicone-icon5.png" alt="产品"> <span>产品</span> </a> <a href="https://spt.ucloud.cn/30001?ytag=seo" rel="nofollow"> <img src="https://www.ucloud.cn/yun/static/theme/ukd/images/topicone-icon6.png" alt="技术服务"> <span>技术服务</span> </a> <a href="https://spt.ucloud.cn/30001?ytag=seo" rel="nofollow"> <img src="https://www.ucloud.cn/yun/static/theme/ukd/images/topicone-icon3.png" alt="售前咨询"> <span>售前咨询</span> </a> </div> </div> <!-- 文章详情右侧广告--> <div class="com_layuiright-box"> <h6 class="top-com-title"><span>最新活动</span></h6> <div class="com_adbox"> <div class="layui-carousel" id="right-item"> <div carousel-item> <div> <a href="https://www.ucloud.cn/site/product/uhost.html" rel="nofollow"> <img src="https://www.ucloud.cn/yun/data/attach/220620/Z7TLrpAi.png" alt="云服务器"> </a> </div> <div> <a href="https://www.ucloud.cn/site/product/uhybrid.html" rel="nofollow"> <img src="https://www.ucloud.cn/yun/data/attach/220620/MWraMsBh.png" alt="混合云"> </a> </div> <div> <a href="https://www.ucloud.cn/site/product/ucloudstack.html" rel="nofollow"> <img src="https://www.ucloud.cn/yun/data/attach/220620/ifzOxvjW.png" alt="私有云"> </a> </div> <div> <a href="https://www.ucloud.cn/site/product/utrion.html" rel="nofollow"> <img src="https://www.ucloud.cn/yun/data/attach/220620/VDqwC1iN.png" alt="超融合服务器"> </a> </div> <div> <a href="https://www.ucloud.cn/site/product/uhybrid.html" rel="nofollow"> <img src="https://www.ucloud.cn/yun/data/attach/220630/pJwnviKN.png" alt="服务器托管"> </a> </div> <div> <a href="https://www.ucloud.cn/site/product/uxzone.html" rel="nofollow"> <img src="https://www.ucloud.cn/yun/data/attach/220630/CDb5uXxp.jpeg" alt="idc机房托管"> </a> </div> <div> <a href="https://www.ucloud.cn/site/active/network.html?ytag=seo" rel="nofollow"> <img src="https://www.ucloud.cn/yun/data/attach/230227/XWsSXmvm.png" alt="专线服务"> </a> </div> </div> </div> </div> <!-- banner结束 --> <div class="adhtml"> </div> <script> $(function(){ $.ajax({ type: "GET", url:"https://www.ucloud.cn/yun/ad/getad/1.html", cache: false, success: function(text){ $(".adhtml").html(text); } }); }) </script> </div> </div> </div> </div> </div> </section> <!-- wap拉出按钮 --> <div class="site-tree-mobile layui-hide"> <i class="layui-icon layui-icon-spread-left"></i> </div> <!-- wap遮罩层 --> <div class="site-mobile-shade"></div> <!--付费阅读 --> <div id="payread"> <div class="layui-form-item">阅读需要支付1元查看</div> <div class="layui-form-item"><button class="btn-right">支付并查看</button></div> </div> <script> var prei=0; $(".site-seo-depict pre").each(function(){ var html=$(this).html().replace("<code>","").replace("</code>","").replace('<code class="javascript hljs" codemark="1">',''); $(this).attr('data-clipboard-text',html).attr("id","pre"+prei); $(this).html("").append("<code>"+html+"</code>"); prei++; }) $(".site-seo-depict img").each(function(){ if($(this).attr("src").indexOf('data:image/svg+xml')!= -1){ $(this).remove(); } }) $("LINK[href*='style-49037e4d27.css']").remove(); $("LINK[href*='markdown_views-d7a94ec6ab.css']").remove(); layui.use(['jquery', 'layer','code'], function(){ $("pre").attr("class","layui-code"); $("pre").attr("lay-title",""); $("pre").attr("lay-skin",""); layui.code(); $(".layui-code-h3 a").attr("class","copycode").html("复制代码 ").attr("onclick","copycode(this)"); }); function copycode(target){ var id=$(target).parent().parent().attr("id"); var clipboard = new ClipboardJS("#"+id); clipboard.on('success', function(e) { e.clearSelection(); alert("复制成功") }); clipboard.on('error', function(e) { alert("复制失败") }); } //$(".site-seo-depict").html($(".site-seo-depict").html().slice(0, -5)); </script> <link rel="stylesheet" type="text/css" href="https://www.ucloud.cn/yun/static/js/neweditor/code/styles/tomorrow-night-eighties.css"> <script src="https://www.ucloud.cn/yun/static/js/neweditor/code/highlight.pack.js" type="text/javascript"></script> <script src="https://www.ucloud.cn/yun/static/js/clipboard.js"></script> <script>hljs.initHighlightingOnLoad();</script> <script> function setcode(){ var _html=''; document.querySelectorAll('pre code').forEach((block) => { var _tmptext=$.trim($(block).text()); if(_tmptext!=''){ _html=_html+_tmptext; console.log(_html); } }); } </script> <script> function payread(){ layer.open({ type: 1, title:"付费阅读", shadeClose: true, content: $('#payread') }); } // 举报 function jupao_tip(){ layer.open({ type: 1, title:false, shadeClose: true, content: $('#jubao') }); } $(".getcommentlist").click(function(){ var _id=$(this).attr("dataid"); var _tid=$(this).attr("datatid"); $("#articlecommentlist"+_id).toggleClass("hide"); var flag=$("#articlecommentlist"+_id).attr("dataflag"); if(flag==1){ flag=0; }else{ flag=1; //加载评论 loadarticlecommentlist(_id,_tid); } $("#articlecommentlist"+_id).attr("dataflag",flag); }) $(".add-comment-btn").click(function(){ var _id=$(this).attr("dataid"); $(".formcomment"+_id).toggleClass("hide"); }) $(".btn-sendartcomment").click(function(){ var _aid=$(this).attr("dataid"); var _tid=$(this).attr("datatid"); var _content=$.trim($(".commenttext"+_aid).val()); if(_content==''){ alert("评论内容不能为空"); return false; } var touid=$("#btnsendcomment"+_aid).attr("touid"); if(touid==null){ touid=0; } addarticlecomment(_tid,_aid,_content,touid); }) $(".button_agree").click(function(){ var supportobj = $(this); var tid = $(this).attr("id"); $.ajax({ type: "GET", url:"https://www.ucloud.cn/yun/index.php?topic/ajaxhassupport/" + tid, cache: false, success: function(hassupport){ if (hassupport != '1'){ $.ajax({ type: "GET", cache:false, url: "https://www.ucloud.cn/yun/index.php?topic/ajaxaddsupport/" + tid, success: function(comments) { supportobj.find("span").html(comments+"人赞"); } }); }else{ alert("您已经赞过"); } } }); }); function attenquestion(_tid,_rs){ $.ajax({ //提交数据的类型 POST GET type:"POST", //提交的网址 url:"https://www.ucloud.cn/yun/favorite/topicadd.html", //提交的数据 data:{tid:_tid,rs:_rs}, //返回数据的格式 datatype: "json",//"xml", "html", "script", "json", "jsonp", "text". //在请求之前调用的函数 beforeSend:function(){}, //成功返回之后调用的函数 success:function(data){ var data=eval("("+data+")"); console.log(data) if(data.code==2000){ layer.msg(data.msg,function(){ if(data.rs==1){ //取消收藏 $(".layui-layer-tips").attr("data-tips","收藏文章"); $(".layui-layer-tips").html('<i class="fa fa-heart-o"></i>'); } if(data.rs==0){ //收藏成功 $(".layui-layer-tips").attr("data-tips","已收藏文章"); $(".layui-layer-tips").html('<i class="fa fa-heart"></i>') } }) }else{ layer.msg(data.msg) } } , //调用执行后调用的函数 complete: function(XMLHttpRequest, textStatus){ postadopt=true; }, //调用出错执行的函数 error: function(){ //请求出错处理 postadopt=false; } }); } </script> <footer> <div class="layui-container"> <div class="flex_box_zd"> <div class="left-footer"> <h6><a href="https://www.ucloud.cn/"><img src="https://www.ucloud.cn/yun/static/theme/ukd//images/logo.png" alt="UCloud (优刻得科技股份有限公司)"></a></h6> <p>UCloud (优刻得科技股份有限公司)是中立、安全的云计算服务平台,坚持中立,不涉足客户业务领域。公司自主研发IaaS、PaaS、大数据流通平台、AI服务平台等一系列云计算产品,并深入了解互联网、传统企业在不同场景下的业务需求,提供公有云、混合云、私有云、专有云在内的综合性行业解决方案。</p> </div> <div class="right-footer layui-hidemd"> <ul class="flex_box_zd"> <li> <h6>UCloud与云服务</h6> <p><a href="https://www.ucloud.cn/site/about/intro/">公司介绍</a></p> <p><a href="https://zhaopin.ucloud.cn/" >加入我们</a></p> <p><a href="https://www.ucloud.cn/site/ucan/onlineclass/">UCan线上公开课</a></p> <p><a href="https://www.ucloud.cn/site/solutions.html" >行业解决方案</a></p> <p><a href="https://www.ucloud.cn/site/pro-notice/">产品动态</a></p> </li> <li> <h6>友情链接</h6> <p><a href="https://www.surfercloud.com/">SurferCloud</a></p> <p><a href="https://ucloudstack.com/" >私有云</a></p><p><a href="https://pinex.it" >pinex</a></p> <p><a href="https://www.renyucloud.com/" ></a></p> <p><a href="https://www.picpik.ai" >AI Art Generator</a></p> <p><a href="https://www.uwin-link.com" >工厂仿真软件</a></p> </li> <li> <h6>社区栏目</h6> <p><a href="https://www.ucloud.cn/yun/column/index.html">专栏文章</a></p> <p><a href="https://www.ucloud.cn/yun/ask/">专业问答</a></p> <p><a href="https://www.ucloud.cn/yun/kc.html">云学院</a></p> <p><a href="https://www.ucloud.cn/yun/udata/">专题地图</a></p> </li> <li> <h6>常见问题</h6> <p><a href="https://www.ucloud.cn/site/ucsafe/notice.html" >安全中心</a></p> <p><a href="https://www.ucloud.cn/site/about/news/recent/" >新闻动态</a></p> <p><a href="https://www.ucloud.cn/site/about/news/report/">媒体动态</a></p> <p><a href="https://www.ucloud.cn/site/cases.html">客户案例</a></p> <p><a href="https://www.ucloud.cn/site/notice/">公告</a></p> </li> <li> <span><img src="https://static.ucloud.cn/7a4b6983f4b94bcb97380adc5d073865.png" alt="优刻得"></span> <p>扫扫了解更多</p></div> </div> <div class="copyright">Copyright © 2012-2023 UCloud 优刻得科技股份有限公司<i>|</i><a rel="nofollow" href="http://beian.miit.gov.cn/">沪公网安备 31011002000058号</a><i>|</i><a rel="nofollow" href="http://beian.miit.gov.cn/"></a> 沪ICP备12020087号-3</a><i>|</i> <script type="text/javascript" src="https://gyfk12.kuaishang.cn/bs/ks.j?cI=197688&fI=125915" charset="utf-8"></script> <script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?290c2650b305fc9fff0dbdcafe48b59d"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script> <!-- Global site tag (gtag.js) - Google Analytics --> <script async src="https://www.googletagmanager.com/gtag/js?id=G-DZSMXQ3P9N"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-DZSMXQ3P9N'); </script> <script> (function(){ var el = document.createElement("script"); el.src = "https://lf1-cdn-tos.bytegoofy.com/goofy/ttzz/push.js?99f50ea166557aed914eb4a66a7a70a4709cbb98a54ecb576877d99556fb4bfc3d72cd14f8a76432df3935ab77ec54f830517b3cb210f7fd334f50ccb772134a"; el.id = "ttzz"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(el, s); })(window) </script></div> </div> </footer> </body> <script src="https://www.ucloud.cn/yun/static/theme/ukd/js/common.js"></script> <<script type="text/javascript"> $(".site-seo-depict *,.site-content-answer-body *,.site-body-depict *").css("max-width","100%"); </script> </html>