资讯专栏INFORMATION COLUMN

元信息类标签head.title.meta的使用目的和配置方法

ddongjian0000 / 2980人阅读

摘要:标签的属性语法格式是参数参数变量值浏览模式像是使用了的模式,这与显示内容的方式很相似。无论页面是否包含指令,均使用的标准渲染模式。设定说明如果网页过期,那么存盘的将被删除注意必须使用的时间格式。

Head中的全局属性 base

base标签指定了一个url地址作为基准,那么当前文档中的所有超链接都遵循这一规则,在a中设置访问目标的相对地址,浏览器会自动解析出一个完整的链接地址,若a的href为空,浏览器也会根据base所给的url进行访问。
注意:base标签需放在包含url地址的语句前面


  


  可以跳到百度云数字营销解决方案

Link

link 标签:用于引入外部的文档,常用到引用css样式或icon图标
其中:rel属性是link标签的核心
注意:在 HTML 中, 标签没有结束标签
在 XHTML 中, 标签必须被正确地关闭

charset 属性规定被链接文档的字符编码方式。

在下面的例子中,charset 属性指示被链接文档是用英文编写的:


  

HTML5 中不支持

href 属性规定被链接文档的位置(URL)

在下面的例子中,href 属性指向了一个外部样式表的位置:


  

reflang 属性规定被链接文档中文本的语言
在下面的例子中,hreflang 属性指示被链接文档是用简体中文编写的:


  

media 属性规定被链接文档将显示在什么设备上

两种不同的样式表,针对两种不同的媒介类型(计算机屏幕和打印):


  
  

rel 属性规定当前文档与被链接文档之间的关系
只有 rel 属性的 "stylesheet" 值得到了所有浏览器的支持。其他值只得到了部分地支持
在下面的例子中,rel 属性指示被链接的文档是一个样式表:


  

1.stylesheet 外部样式表
2.icon 网站图标

3.canonical 指明网址的规范版本
canonical属性用于让搜索引擎知道当前网站中的重复或相似网页中,哪一个页面才是站长想让其抓取与收录的。

title

浏览器会以特殊的方式来使用标题,当把文档加入链接列表或收藏夹时,文档标题将成为该链接的默认名称
标签是 <head> 标签中唯一要求包含的东西<br><strong>1.dir</strong><br>属性为rtl和ltr规定元素中内容的文本方向-正向和反向。<br><strong>2.lang</strong><br>规定元素中内容的语言代码<br><strong>3.xml:lang</strong><br>规定 XHTML 文档中元素内容的语言代码</p> <b><strong>meta</strong></b> <p><strong>name属性</strong><br>主要用于描述网页,与之对应的属性值为content,content中的内容主要是便于搜索引擎机器人查找信息和分类信息用的.</p> <pre><meta name="参数"content="具体的参数值"></pre> <p>1.keywords 关键字<br>keywords用来告诉搜索引擎你网页的关键字是什么</p> <pre><meta name="keywords"content="science,education,culture,politics,ecnomics,relationships,entertaiment,human"></pre> <p>2.description 网站内容描述</p> <pre><meta name="description"content="这是一个学习的网站"></pre> <p>3.robots 机器人向导<br>robots用来告诉搜索机器人哪些页面需要索引,哪些页面不需要索引<br>content的参数有all,none,index,noindex,follow,nofollow。默认是all</p> <pre><meta name="robots"content="none"></pre> <p>4.author 作者<br>标注网页的作者</p> <pre><meta name="author" content="root,root@xxxx.com"></pre> <p>5.rendere 渲染模式</p> <pre> <meta name="renderer" content="webkit"></pre> <p>6.viewport(视图模式)<br><strong>对手机端而言很重要</strong><br>可把content="width-device=width",则宽度为使用手机的宽度</p> <pre><meta name="viewport" content=" width=device-width, //viewport的高度 initial-scle=1.0, //初始的缩放比例 maximum-scale=1.0, //允许用户缩放到的最小比例 minimum-scale=1.0, //允许用户缩放到的最大比例 user-scalable=no" //用户是否可以手动缩放 /></pre> <p><strong>http-equiv属性</strong><br>http-equiv顾名思义,相当于http的文件头作用,它可以向浏览器传回一些有用的信息,以帮助正确和精确地显示网页内容,与之对应的属性值为content,content中的内容其实就是各个参数的变量值。</p> <p>meta标签的http-equiv属性语法格式是:</p> <pre><meta http-equiv="参数"content="参数变量值"></pre> <p>1.X-UA-Compatible 浏览模式</p> <pre><meta http-equiv="X-UA-Compatible" content="IE=5" /></pre> <p>像是使用了 Windows Internet Explorer 7 的 Quirks 模式,这与 Windows Internet Explorer 5 显示内容的方式很相似。</p> <pre><meta http-equiv="X-UA-Compatible" content="IE=7" /></pre> <p>无论页面是否包含 <!DOCTYPE> 指令,均使用 Windows Internet Explorer 7 的标准渲染模式。</p> <pre><meta http-equiv="X-UA-Compatible" content="IE=8" /></pre> <p>开启 IE8 的标准渲染模式,但由于本身 X-UA-Compatible 文件头仅支持 IE8 以上版本,因此等同于冗余代码。</p> <pre><meta http-equiv="X-UA-Compatible" content="edge" /></pre> <p>Edge 模式通知 Windows Internet Explorer 以最高级别的可用模式显示内容,这实际上破坏了“锁定”模式。即如果你有IE9的话说明你有IE789,那么就调用高版本的那个也就是IE9。</p> <p>2.Expires 期限<br>可以用于设定网页的到期时间,一旦网页过期,必须到服务器上重新传输</p> <pre><meta http-equiv="expires"content="Fri,01Jan201618:18:18GMT"></pre> <p>3.Pragma cache模式<br>说明:禁止浏览器从本地计算机的缓存中访问页面内容。<br>注意:这样设定,访问者将无法脱机浏览。</p> <pre><meta http-equiv="Pragma" content="no-cache"></pre> <p>4.Refresh 刷新<br>说明:自动刷新并指向新页面<br>注意:其中的2是指停留2秒钟后自动刷新到URL网址。</p> <pre><meta http-equiv="Refresh" content="2;URL=http://www.jb51.net"></pre> <p>5.Set-Cookie cookie设定<br>说明:如果网页过期,那么存盘的cookie将被删除<br>注意:必须使用GMT的时间格式。</p> <pre><meta http-equiv="Set-Cookie"content="cookievalue=xxx;expires=Friday,12-Jan-200118:18:18GMT;path=/"></pre> <p>6.Window-target 显示窗口的设定<br>说明:强制页面在当前窗口以独立页面显示。<br>注意:用来防止别人在框架里调用自己的页面。</p> <pre><meta http-equiv="Window-target" content="_blank"></pre> <p>7.content-Type 显示字符集的设定<br>说明:设定页面使用的字符集</p> <pre><meta http-equiv="content-Type" content="text/html;charset=gb2312"></pre> <p>8.content-Language 显示语言的设定</p> <pre><meta http-equiv="Content-Language" content="zh-cn"/></pre> <p>此文章参考此链接</p> </div> <div class="mt-64 tags-seach" > <div class="tags-info"> <a style="width:120px;" title="海外云主机" href="https://www.ucloud.cn/site/active/kuaijiesale.html?ytag=seo#global-uhost">海外云主机</a> <a style="width:120px;" title="云服务器" href="https://www.ucloud.cn/site/active/kuaijiesale.html?ytag=seo">云服务器</a> <a style="width:120px;" title="标签使用方法" href="https://www.ucloud.cn/yun/tag/biaoqianshiyongfangfa/">标签使用方法</a> <a style="width:120px;" title="php使用父类方法" href="https://www.ucloud.cn/yun/tag/phpshiyongfuleifangfa/">php使用父类方法</a> <a style="width:120px;" title="js定义类和方法" href="https://www.ucloud.cn/yun/tag/jsdingyileihefangfa/">js定义类和方法</a> <a style="width:120px;" title="js中添加类的方法" href="https://www.ucloud.cn/yun/tag/jszhongtianjialeidefangfa/">js中添加类的方法</a> </div> </div> <div class="entry-copyright mb-30"> <p class="mb-15"> 文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。</p> <p>转载请注明本文地址:https://www.ucloud.cn/yun/55016.html</p> </div> <ul class="pre-next-page"> <li class="ellipsis"><a class="hpf" href="https://www.ucloud.cn/yun/55015.html">上一篇:圣杯布局和双飞翼布局</a></li> <li class="ellipsis"><a class="hpf" href="https://www.ucloud.cn/yun/55017.html">下一篇:9102年:手写一个React脚手架 【优化极致版】</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-left"> <a href="https://www.ucloud.cn/yun/1328.html"><img src="https://img2018.cnblogs.com/blog/929994/201901/929994-20190114192833632-2088471619.png" alt=""></a> </div> <div class="atricle-list-right"> <h2 class="ellipsis2"><a class="hpf" href="https://www.ucloud.cn/yun/1328.html"><b>Django-Oscar小记:如何<em>使用</em>高版本Django开发网页<em>的</em>SEO模块</b></a></h2> <p class="ellipsis2 good">摘要:在使用搜索的插件时,很多插件都没有更新到,有的插件更新到了的高版本,但是不适用于的。在升级到版本的时候删除了很多类。正确指令不是,是完毕后,数据库生成表。我们最终使用到的表就是。有了自己的基类之后,在中配置的父类。在使用Google搜索Django的SEO插件时,很多插件都没有更新到Python3.x,有的插件更新到了Python的高版本,但是不适用于Django的2.x。 Django在升...</p> <div class="com_white-left-info"> <div class="com_white-left-infol"> <a href="https://www.ucloud.cn/yun/u-1725.html"><img src="https://www.ucloud.cn/yun/data/avatar/000/00/17/small_000001725.jpg" alt=""><span class="layui-hide64">番茄西红柿</span></a> <time datetime="">2019-04-23 11:54</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/112007.html"><b>HTML+CSS复习之HTML基础篇</b></a></h2> <p class="ellipsis2 good">摘要:规定元素的上下文菜单。上下文菜单在用户点击元素时显示。规定元素仍未或不再相关。规定是否对元素进行拼写和语法检查。规定元素的行内样式。 一些说明 写在前面:HTML和CSS,当你了解所有规则后,你应该多写页面并记录你出现的问题,这才是学习HTML和CSS的最佳方法 这是我学习一段时间之后,再次回顾HTML,希望大家也对HTML有不一样的认识 我把HTML标签分成两大类,重要的和不重要的,...</p> <div class="com_white-left-info"> <div class="com_white-left-infol"> <a href="https://www.ucloud.cn/yun/u-835.html"><img src="https://www.ucloud.cn/yun/data/avatar/000/00/08/small_000000835.jpg" alt=""><span class="layui-hide64">genefy</span></a> <time datetime="">2019-08-29 12:35</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/50795.html"><b>HTML+CSS复习之HTML基础篇</b></a></h2> <p class="ellipsis2 good">摘要:规定元素的上下文菜单。上下文菜单在用户点击元素时显示。规定元素仍未或不再相关。规定是否对元素进行拼写和语法检查。规定元素的行内样式。 一些说明 写在前面:HTML和CSS,当你了解所有规则后,你应该多写页面并记录你出现的问题,这才是学习HTML和CSS的最佳方法 这是我学习一段时间之后,再次回顾HTML,希望大家也对HTML有不一样的认识 我把HTML标签分成两大类,重要的和不重要的,...</p> <div class="com_white-left-info"> <div class="com_white-left-infol"> <a href="https://www.ucloud.cn/yun/u-326.html"><img src="https://www.ucloud.cn/yun/data/avatar/000/00/03/small_000000326.jpg" alt=""><span class="layui-hide64">MrZONT</span></a> <time datetime="">2019-08-01 16:51</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/103875.html"><b>一名【合格】前端工程师<em>的</em>自检清单</b></a></h2> <p class="ellipsis2 good">摘要:在他的重学前端课程中提到到现在为止,前端工程师已经成为研发体系中的重要岗位之一。大部分前端工程师的知识,其实都是来自于实践和工作中零散的学习。一基础前端工程师吃饭的家伙,深度广度一样都不能差。 开篇 前端开发是一个非常特殊的行业,它的历史实际上不是很长,但是知识之繁杂,技术迭代速度之快是其他技术所不能比拟的。 winter在他的《重学前端》课程中提到: 到现在为止,前端工程师已经成为研...</p> <div class="com_white-left-info"> <div class="com_white-left-infol"> <a href="https://www.ucloud.cn/yun/u-69.html"><img src="https://www.ucloud.cn/yun/data/avatar/000/00/00/small_000000069.jpg" alt=""><span class="layui-hide64">罗志环</span></a> <time datetime="">2019-08-23 17:08</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/6694.html"><b>一名【合格】前端工程师<em>的</em>自检清单</b></a></h2> <p class="ellipsis2 good">摘要:在他的重学前端课程中提到到现在为止,前端工程师已经成为研发体系中的重要岗位之一。大部分前端工程师的知识,其实都是来自于实践和工作中零散的学习。一基础前端工程师吃饭的家伙,深度广度一样都不能差。开篇 前端开发是一个非常特殊的行业,它的历史实际上不是很长,但是知识之繁杂,技术迭代速度之快是其他技术所不能比拟的。 winter在他的《重学前端》课程中提到: 到现在为止,前端工程师已经成为研发体系...</p> <div class="com_white-left-info"> <div class="com_white-left-infol"> <a href="https://www.ucloud.cn/yun/u-1650.html"><img src="https://www.ucloud.cn/yun/data/avatar/000/00/16/small_000001650.jpg" alt=""><span class="layui-hide64">isaced</span></a> <time datetime="">2019-05-21 19:50</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-666.html"><img src="https://www.ucloud.cn/yun/data/avatar/000/00/06/small_000000666.jpg" alt=""></a> <h3><a href="https://www.ucloud.cn/yun/u-666.html" rel="nofollow">ddongjian0000</a></h3> <h6>男<span>|</span>高级讲师</h6> <div class="flex_box_zd user-msgbox-atten"> <a href="javascript:attentto_user(666)" id="attenttouser_666" 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-666.html" class="box_hxjz">阅读更多</a> </div> <ul class="user-msgbox-ul"> <li><h3 class="ellipsis"><a href="https://www.ucloud.cn/yun/125083.html">mitmproxy与安卓模拟器搭配,助力Python爬虫工程师,然后就可以爬CSDN粉丝数据了</a></h3> <p>阅读 2518<span>·</span>2021-11-25 09:43</p></li> <li><h3 class="ellipsis"><a href="https://www.ucloud.cn/yun/118651.html">EtherNetservers:洛杉矶VPS主机$12/年起,支持支付宝/PayPal</a></h3> <p>阅读 3442<span>·</span>2021-08-31 09:41</p></li> <li><h3 class="ellipsis"><a href="https://www.ucloud.cn/yun/117563.html">小程序显示弹窗时禁止下层的内容滚动</a></h3> <p>阅读 1002<span>·</span>2019-08-30 15:56</p></li> <li><h3 class="ellipsis"><a href="https://www.ucloud.cn/yun/117360.html">css变量赋值和取值的四种方式(js设置值、内联样式、:root选择器、html选择器)</a></h3> <p>阅读 1815<span>·</span>2019-08-30 15:55</p></li> <li><h3 class="ellipsis"><a href="https://www.ucloud.cn/yun/115554.html">Nuxt SSR 阿里云部署之nginx代理--详解篇</a></h3> <p>阅读 2740<span>·</span>2019-08-30 13:48</p></li> <li><h3 class="ellipsis"><a href="https://www.ucloud.cn/yun/113195.html">Codepen 每周精选:22个页面特效(2018-5-2)</a></h3> <p>阅读 2686<span>·</span>2019-08-29 15:15</p></li> <li><h3 class="ellipsis"><a href="https://www.ucloud.cn/yun/113191.html">【图片版】CSS网格布局(Grid)完全教程</a></h3> <p>阅读 765<span>·</span>2019-08-29 15:14</p></li> <li><h3 class="ellipsis"><a href="https://www.ucloud.cn/yun/111229.html">负margin的几个问题</a></h3> <p>阅读 2497<span>·</span>2019-08-28 18:26</p></li> </ul> </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/active/kuaijiesale.html?ytag=seo" rel="nofollow"> <img src="https://www.ucloud.cn/yun/data/attach/240506/zYeoGo8M.png" alt="云服务器"> </a> </div> <div> <a href="https://www.ucloud.cn/site/active/gpu.html?ytag=seo" rel="nofollow"> <img src="https://www.ucloud.cn/yun/data/attach/240506/29R6rrOS.png" alt="GPU服务器"> </a> </div> <div> <a href="https://www.ucloud.cn/site/active/kuaijiesale.html?ytag=seo#global-uhost" rel="nofollow"> <img src="https://www.ucloud.cn/yun/data/attach/240506/FFBiRWaT.png" alt="海外云主机"> </a> </div> <div> <a href="https://www.ucloudstack.com/?ytag=seo" rel="nofollow"> <img src="https://www.ucloud.cn/yun/data/attach/240506/VEgKnwRX.png" alt="私有云"> </a> </div> <div> <a href="https://www.ucloud.cn/site/active/new/uhybrid.html?ytag=seo#datacenter" rel="nofollow"> <img src="https://www.ucloud.cn/yun/data/attach/240506/Z1o6CMPK.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.compshare.cn/?ytag=seo">GPU算力平台</a></p> <p><a href="https://www.ucloudstack.com/?ytag=seo">UCloud私有云</a></p> <p><a href="https://www.surfercloud.com/">SurferCloud</a></p> <p><a href="https://www.uwin-link.com/">工厂仿真软件</a></p> <p><a href="https://pinex.it/">Pinex</a></p> <p><a href="https://www.picpik.ai/zh">AI绘画</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/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>