<meat>元素

概要

提供有关页面的元信息,标签位于文档的头部,不包含任何内容。标签的属性定义了与文档相关联的名称/值对。

注意:这是一个单标记符,如果写的是XHTML代码,则应在标记符的(/)后加个空格。

SEO优化

页面关键词

每个网页应具有描述该网页内容的一组唯一的关键字。
使用人们可能会搜索,并准确描述网页上所提供信息的描述性和代表性关键字及短语。标记内容太短,则搜索引擎可能不会认为这些内容相关。另外标记不应超过 874 个字符。

<meta name="keywords" content="your tags" />

页面字符码

如果页面只使用英语(或使用罗马字母的语言),可以明确指定。

<meta charset="utf-8">

页面描述

每个网页都应有一个不超过 150 个字符且能准确反映网页内容的描述标签。

<meta name="description" content="150 words" />

搜索引擎索引方式

robotterms是一组使用逗号(,)分割的值,通常有如下几种取值:none,noindex,nofollow,all,index和follow。确保正确使用nofollow和noindex属性值。

<meta name="robots" content="index,follow" />
<!--
all:文件将被检索,且页面上的链接可以被查询;
none:文件将不被检索,且页面上的链接不可以被查询;
index:文件将被检索;
follow:页面上的链接可以被查询;
noindex:文件将不被检索;
nofollow:页面上的链接不可以被查询。
-->

页面重定向和刷新

content内的数字代表时间(秒),既多少时间后刷新。如果加url,则会重定向到指定网页(搜索引擎能够自动检测,也很容易被引擎视作误导而受到惩罚)。

<meta http-equiv="refresh" content="0;url=" />

其他

<meta name="author" content="author name" /> <!-- 定义网页作者 -->
<meta name="google" content="index,follow" />
<meta name="googlebot" content="index,follow" />
<meta name="verify" content="index,follow" />

参考:http://segmentfault.com/a/1190000002407912#articleHeader1

const unsigned char systemsettingpage[] = { "<html>\r\n" "<head>\r\n" "<meta charset=\"gb2312\">\r\n" // 20210421LWD "<meta http-equiv=\"X-UA-Compatible\" content=\"IE=EmulateIE7\" />\r\n" // 20210421LWD "<title>智能蓄电池监控系统</title>" //"<Meat http-equiv=Content-Type content=text/html charset=gb2312>"//2021-03-19 "<script type=\"text/javascript\"> \r\n" "function validate()\r\n" "{\r\n" "var CT=document.getElementById(\"CT\").value\r\n" "var MT=document.getElementById(\"MT\").value\r\n" "var RT=document.getElementById(\"RT\").value\r\n" "var AD=document.getElementById(\"AD\").value\r\n" "var DA=document.getElementById(\"DA\").value\r\n" "var TM=document.getElementById(\"TM\").value\r\n" "var ED=document.getElementById(\"ED\").value\r\n" "var testtm=\"(([0-1][0-9])|(2[0-3])):[0-5][0-9]:[0-5][0-9]\"\r\n" "var testda=\"[2][0][0-9][0-9]-(([0][0-9])|([1][0-2]))-(([0-2][0-9])|([3][0-1]))\"\r\n" "submitOK=\"true\"\r\n" "if (isNaN(ED) || ED<0.0 || ED>0.2)\r\n" "{\r\n" "alert(\"均衡差异输入错误!\")\r\n" "submitOK=\"false\"\r\n" "}\r\n" "if (isNaN(CT) || CT<1 || CT>65535)\r\n" "{\r\n" "alert(\"充电记录周期输入错误!\")\r\n" "submitOK=\"false\"\r\n" "}\r\n" "if (isNaN(MT) || MT<29 || MT>65535)\r\n" "{\r\n" "alert(\"模块关机时间输入错误!\")\r\n" "submitOK=\"false\"\r\n" "}\r\n" "if (isNaN(AD) || AD<0 || AD>255)\r\n" "{\r\n" "alert(\"RS485地址超出范围!\")\r\n" "submitOK=\"false\"\r\n" "}\r\n" "if (isNaN(RT) || RT<0.1 || RT>65535.0)\r\n" "{\r\n" "alert(\"内阻测试周期输入错误!\")\r\n" "submitOK=\"false\"\r\n" "}\r\n" "if (DA.match(testda)==null)\r\n" "{\r\n" "alert(\"日期输入错误!\")\r\n" "submitOK=\"false\"\r\n" "}\r\n" "if (TM.match(testtm)==null)\r\n" "{\r\n" "alert(\"时间输入错误!\")\r\n" "submitOK=\"false\"\r\n" "}\r\n" "if(submitOK==\"false\")\r\n" "{\r\n" "return false\r\n" "}\r\n" "document.getElementById(\"RT\").value *=10\r\n" "document.getElementById(\"ED\").value *=100\r\n" "}\r\n" "function validate1()\r\n" "{\r\n" "var MA=document.getElementById(\"MA\").value\r\n" "var IP=document.getElementById(\"IP\").value\r\n" "var NG=document.getElementById(\"NG\").value\r\n" "var SM=document.getElementById(\"SM\").value\r\n" "var PN=document.getElementById(\"PN\").value\r\n" "var PR=document.getElementById(\"PR\").value\r\n" "var testma=\"[F][4].[0][E].[1][1].([0-9]|[A-F])([0-9]|[A-F]).([0-9]|[A-F])([0-9]|[A-F]).([0-9]|[A-F])([0-9]|[A-F])\"\r\n" "var testip=\"(([0-1][0-9][0-9])|([0-2][0-5][0-5])).(([0-1][0-9][0-9])|([0-2][0-5][0-5])).(([0-1][0-9][0-9])|([0-2][0-5][0-5])).(([0-1][0-9][0-9])|([0-2][0-5][0-5]))\"\r\n" "submitOK=\"true\"\r\n" "if (MA.match(testma)==null)\r\n" "{\r\n" "alert(\"MAC地址输入错误!\")\r\n" "submitOK=\"false\"\r\n" "}\r\n" "if (IP.match(testip)==null)\r\n" "{\r\n" "alert(\"IP地址输入错误!\")\r\n" "submitOK=\"false\"\r\n" "}\r\n" "if (NG.match(testip)==null)\r\n" "{\r\n" "alert(\"网关地址输入错误!\")\r\n" "submitOK=\"false\"\r\n" "}\r\n" "if (SM.match(testip)==null)\r\n" "{\r\n" "alert(\"子网掩码输入错误!\")\r\n" "submitOK=\"false\"\r\n" "}\r\n" "if (isNaN(PN) || PN<0 || PN>65535)\r\n" "{\r\n" "alert(\"SOCKET1端口输入错误!\")\r\n" "submitOK=\"false\"\r\n" "}\r\n" "if (isNaN(PR) || PR<0 || PR>65535)\r\n" "{\r\n" "alert(\"SOCKET2端口输入错误!\")\r\n" "submitOK=\"false\"\r\n" "}\r\n" "if(submitOK==\"false\")\r\n" "{\r\n" "return false\r\n" "}\r\n" "}\r\n" "</script>\r\n" "</head>\r\n" "<body style=\"background-color:#f4f4f4\">\r\n" // "<h1>\r\n" // "<span style=\"color:#FFFFFF;background-color:#E53333;\"><strong><span style=\"font-size:34px;line-height:1;\">深圳市海德森科技股份有限公司</span></strong></span><br />\r\n" // "</h1>\r\n" "<span style=\"color:#000FFF;font-size:24px\">智能蓄电池监控系统</span>\r\n" "<p align=\"center\">\r\n" "<b>[&nbsp</b>" "<a href=\"/9.html\">主页</a>" "<b>&nbsp|&nbsp</b>" "<a href=\"/4.html\">实时数据</a>" //---------------------------------------------------20210421LWD "<b>&nbsp|&nbsp</b>" "<a href=\"/C.html\">初始内阻</a>" "<b>&nbsp|&nbsp</b>" "<a href=\"/7.html\">报警记录</a>" "<b>&nbsp|&nbsp</b>" "<a href=\"/1.html\">电池设置</a>" "<b>&nbsp|&nbsp</b>" "<a href=\"/2.html\" style=\"color:#ff0000\">系统设置</a>" "<b>&nbsp|&nbsp</b>" "<a href=\"/3.html\">报警设置</a>" "<b>&nbsp|&nbsp</b>" "<a href=\"/G.html\">安装调试</a>" "<b>&nbsp]</b>\r\n" "</p>\r\n" "<hr size=\"1\">\r\n" "<br />" "<form action=\"/2.html\" name=\"fm\" onsubmit=\"return validate()\">" "<p align=\"center\" style=\"color:#000FFF\">系统参数设置</p>" "<p align=\"center\">" "<table width=\"800\" bgcolor=\"#f0ffff\" border=\"0\" cellpadding=\"10\" cellspacing=\"10\">" "<tr>" "<hr size=\"1\" width=\"800\">" "<hr size=\"1\" width=\"800\">" "<td>" "<br />" "RS485设备地址:&nbsp&nbsp&nbsp&nbsp<input type=\"text\" value=%Number name=\"AD\" id=\"AD\" size=\"10\">" "</td>" "<td>" "<br />" "RS485设备速率:&nbsp&nbsp&nbsp&nbsp<select name=\"BD\">" "<option value=\"0\" %Number__>&nbsp&nbsp4800&nbsp&nbsp</option>" "<option value=\"1\" %Number__>&nbsp&nbsp9600</option>" "<option value=\"2\" %Number__>&nbsp&nbsp19200</option>" "</select>" "</td>" "</tr>" "<tr>" "<td>" "充电记录间隔(Min):<input type=\"text\" value=%Number name=\"CT\" id=\"CT\" size=\"10\">" "</td>" "<td>" "内阻测试周期(H):&nbsp&nbsp<input type=\"text\" value=%Number name=\"RT\" id=\"RT\" size=\"10\">" "</td>" "</tr>" "<tr>" "<td>" "FLASH数据清空:&nbsp&nbsp&nbsp&nbsp<select name=\"FR\">" "<option value=\"0\">&nbsp&nbsp禁止&nbsp&nbsp</option>" "<option value=\"1\">&nbsp&nbsp使能</option>" "</select>" "</td>" "<td>" "恢复出厂设置:&nbsp&nbsp&nbsp&nbsp&nbsp<select name=\"RS\">" "<option value=\"0\">&nbsp&nbsp禁止&nbsp&nbsp</option>" "<option value=\"1\">&nbsp&nbsp使能</option>" "</select>" "</td>" "</tr>" "<tr>" "<td>" "主机日期设置:&nbsp&nbsp&nbsp&nbsp&nbsp<input type=\"text\" value=%Number____ name=\"DA\" id=\"DA\" size=\"10\">" "</td>" "<td>" "主机时间设置:&nbsp&nbsp&nbsp&nbsp&nbsp<input type=\"text\" value=%Number__ name=\"TM\" id=\"TM\" size=\"10\">" "</td>" "</tr>" "<tr>" "<td >" "电池均衡:&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp<select name=\"EQ\">" "<option value=\"0\"%Number__>&nbsp&nbsp禁止&nbsp&nbsp</option>" "<option value=\"1\"%Number__>&nbsp&nbsp开启</option" "</select>" "</td>" "<td>" "均衡差异(V):&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp<input type=\"text\"value=%Number name=\"ED\" id=\"ED\" size=\"10\">" "</td>" "</tr>" "<tr>" "<td >" "模块通信速率:&nbsp&nbsp&nbsp&nbsp&nbsp<select name=\"MB\">" //--------------------------------------------------------20210421LWD "<option value=\"0\"%Number__>&nbsp&nbsp4800&nbsp&nbsp</option>" "<option value=\"1\"%Number__>&nbsp&nbsp9600&nbsp&nbsp</option>" "<option value=\"2\"%Number__>&nbsp&nbsp19200&nbsp&nbsp</option>" "<option value=\"3\"%Number__>&nbsp&nbsp38400</option" "</select>" "</td>" "<td>" "模块关机时间(Min):<input type=\"text\" value=%Number name=\"MT\" id=\"MT\" size=\"10\">" "</td>" "</tr>" "<tr>" "<td >" "内阻测试模式:&nbsp&nbsp&nbsp&nbsp&nbsp<select name=\"RM\">" //--------------------------------------------------------20210421LWD "<option value=\"0\"%Number__>&nbsp&nbsp自动快测&nbsp&nbsp</option>" "<option value=\"1\"%Number__>&nbsp&nbsp手动快测&nbsp&nbsp</option>" "<option value=\"2\"%Number__>&nbsp&nbsp自动慢测&nbsp&nbsp</option>" "<option value=\"3\"%Number__>&nbsp&nbsp手动慢测</option" "</select>" "</td>" "<td>" "组压模块:&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp<select name=\"GV\">" "<option value=\"0\"%Number__>&nbsp&nbsp禁止&nbsp&nbsp</option>" "<option value=\"1\"%Number__>&nbsp&nbsp开启</option" "</select>" "</td>" "</tr>" "<tr>" "<td>" "</td>" "<td align=\"right\">" "<input type=\"submit\" value=\"保存\">&nbsp" "<input type=\"reset\" value=\"取消\">" "<br />" "</td>" "</tr>" "</table>" "<hr size=\"1\" width=\"800\">" "<hr size=\"1\" width=\"800\">" "</p>" "</form>" "<form action=\"/2.html\" name=\"fm1\" onsubmit=\"return validate1()\">" "<p align=\"center\" style=\"color:#000FFF\">TCP/IP网络参数设置</p>" "</tr>" "<tr>" "<p align=\"center\">" "<table width=\"800\" bgcolor=\"#f0ffff\" border=\"0\" cellpadding=\"10\" cellspacing=\"10\">" "<tr>" "<hr size=\"1\" width=\"800\">" "<hr size=\"1\" width=\"800\">" "<td>" "<br />" "本机MAC地址:&nbsp<input type=\"text\" value=%Number___________ name=\"MA\" id=\"MA\" size=\"20\">" //----------------------------------20210421LWD "</td>" "<td>" "<br />" "本机IP地址:<input type=\"text\" value=%Number_________ name=\"IP\" id=\"IP\" size=\"18\">" "</td>" "</tr>" "<tr>" "</tr>" "<tr>" "<td>" "本地网关:&nbsp&nbsp&nbsp&nbsp<input type=\"text\" value=%Number_________ name=\"NG\" id=\"NG\" size=\"18\">" "</td>" "<td>" "子网掩码:&nbsp&nbsp<input type=\"text\" value=%Number_________ name=\"SM\" id=\"SM\" size=\"18\">" "</td>" "</tr>" "<tr>" "<td>" "Socket1端口号:<input type=\"text\" value=%Number name=\"PN\" id=\"PN\" size=\"10\">" "</td>" "<td>" "Socket2端口号:<input type=\"text\" value=%Number name=\"PR\" id=\"PR\" size=\"10\">" "</td>" "</tr>" "<tr>" "<td align=\"right\">" "<input type=\"submit\" value=\"保存\">&nbsp" "<input type=\"reset\" value=\"取消\">" "<br />" "</td>" "</tr>" "</table>" "<hr size=\"1\" width=\"800\">" "<hr size=\"1\" width=\"800\">" "</p>" "</form>" // "<script language=\"JavaScript\">\r\n" // "function reloadpg()\r\n" // "{\r\n" "<td align=\"right\">" "<input type=\"submit\" value=\"保存\">&nbsp" "<input type=\"reset\" value=\"取消\">" "<br />" "</td>" // // "setTimeout(\"reloadpg()\",5000)\r\n" // "document.location.href=\"/2.html\"\r\n" // // "}\r\n" // "setTimeout(\"reloadpg()\",5000)\r\n" // // "</script>\r\n" "</body>" "</html>" };转化为完整的16进制数组
09-19
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <style type="text/css"> .tomact { display: flex; width: 100%; height: 1060px; background-color: #03274b; } .head { width: 1410px; height: 1070px; } .info { width: 1400px; height: 810px; } .info-th { width: 1400px; height: 810px; } .item { width: 490px; height: 100px; background-color: #03274b; position: absolute; top: 1%; left: 24%; } .item-th { display: flex; justify-content: center; align-items: center; height: 100px; color: white; font-size: 50px; } .item-th p { margin-top: 40px; } .text { display: flex; width: 1400px; height: 250px; background-color: #03274b; box-shadow: inset 0 0 50px 2px hwb(214 7% 45%); } .origin { margin: 55px 0; width: 400px; height: 165px; border-right: 3px solid hwb(214 7% 45%); } .origin-th { margin: auto; width: 65%; font-weight: bolder; color: white; font-size: 35px; font-family: Serif; } .origin-th p { margin-top: 0; line-height: 1; } .profile { margin: 55px 0; width: 540px; height: 165px; border-right: 3px solid hwb(214 7% 45%); } .profile-th { margin: auto; width: 75%; font-weight: bolder; color: white; font-size: 35px; font-family: Serif; } .profile-th p { margin-top: 0; line-height: 1; } .price { margin: 55px 0; width: 470px; height: 165px; } .price-th { margin: auto; width: 70%; font-weight: bolder; color: white; font-size: 35px; font-family: Serif; } .price-th p { margin-top: 0; line-height: 1; } .price-th label { color: yellow;; } .sidebar { width: 495px; height: 1060px; background-color: #03274b; box-shadow: inset 0 0 50px 2px hwb(214 7% 45%); position: absolute; right: 0; padding: 30px; box-sizing: border-box; } .sidebar h2 { font-size: 30px; color: white; text-align: center; margin-bottom: 50px; margin-top: 70px; font-family: Serif; } .sidebar p { font-size: 25px; margin: 0 20px; color: white; line-height: 1.5; margin-bottom: 60px; font-family: Serif; } .sidebar .image-placeholder { width: 90%; height: 180px; background-color: #0066cc; display: block; margin: 40px auto; color: #fff; } </style> </head> <body> <div class="tomact"> <div class="head"> <div class="info"> <img class="info-th" src="/img/chicken.jpg"> <div class="item"> <div class="item-th"> <p>琵琶腿</p> </div> </div> </div> <div class="text"> <div class="origin"> <div class="origin-th"> <p>产地: </p> <p>山东省临沂市</p> </div> </div> <div class="profile"> <div class="profile-th"> <p>简介:</p> <p>鸡腿, 充分熟制后食用</p> </div> </div> <div class="price"> <div class="price-th"> <p>价格:</p> <p><label>103.00</label>元/箱</p> </div> </div> </div> </div> <div class="sidebar"> <h2>公司名称</h2> <p>简介: 文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容内容文字内容文字内容文字内容文字内容 </p> <div class="image-placeholder"></div> <div class="image-placeholder"></div> </div> </div> </body> <script> const list=[ { img:'./img/chicken.jpg', price:'价格:103.00元/箱', desc:'简介:鸡腿, 充分熟制后食用', title:'琵琶腿', production:'产地:山东省临沂市', }, { img:'./img/butterfly.jpg', price:'价格:195.00元/箱', desc:'简介:南美白对虾、水、食用盐、复配水分保持剂,将产品拆袋解冻清洗干净,加热至熟后食用', title:'国美生蝴蝶虾51/60', production:'产地:广东省湛江市', }, { img:'./img/drumette.jpg', price:'价格:155.00元/箱', desc:'简介:精选鸡翅,微波、烧烤、油炸', title:'安大调理翅根', production:'产地:山东省潍坊市', }, { img:'./img/edamame.jpg', price:'价格:100.00/箱', desc:'简介:小青豆, 适合解冻烹饪使用', title:'琵琶腿', production:'产地:浙江省杭州市', }, { img:'./img/fragrant.jpg', price:'价格:354.00元/箱', desc:'简介:对虾、纯净水, 充分熟制后食用', title:'8/12盐田虾', production:'产地:海南省琼海市', }, { img:'./img/hairtail.jpg', price:'价格:345.00元/箱', desc:'简介:带鱼、唐扬粉(小麦粉、淀粉、米粉、香辛料、白砂糖)、酱油、食用盐', title:'秘制带鱼M', production:'产地:浙江省舟山市', }, { img:'./img/pack.jpg', price:'价格:120.00元/箱', desc:'简介:毛豆仁, 适合解冻烹饪使用', title:'速冻甜青豆中(白)', production:'产地:浙江省杭州市', }, { img:'./img/joint.jpg', price:'价格:325.00元/箱', desc:'简介:精选鸡翅,微波、烧烤、油炸', title:'安大奥尔良翅中(绿胶带)', production:'产地:山东省潍坊市', }, { img:'./img/leg.jpg', price:'价格:116.00元/箱', desc:'简介:鸡肉, 充分熟制后食用', title:'毛毛肉', production:'产地:山东省济南市', }, { img:'./img/maize.jpg', price:'价格:66.00元/箱', desc:'简介:玉米粒, 解冻烹饪后使用', title:'速冻甜玉米粒', production:'产地:浙江省杭州市', }, { img:'./img/meat.jpg', price:'价格:180.00元/箱', desc:'简介:南美白对虾、水、食用盐、复配水分保持剂,充分烹调后可食用', title:'国美生虾仁60/70', production:'产地:广东省湛江市', }, { img:'./img/media.jpg', price:'价格:420.00元/箱', desc:'简介:鸡肉, 充分熟制后食用', title:'40/50翅中', production:'产地:山东省滨州市', }, { img:'./img/pork.jpg', price:'价格:440.00元/箱', desc:'简介:带骨猪肉,充分熟制后食用', title:'猪肋排', production:'产地:浙江省杭州市', }, { img:'./img/prawn.jpg', price:'价格:0.00元/箱', desc:'简介:盐田虾,解冻后加水和生姜烧沸关火,将熟虾入沸水中浸泡1分钟,蘸料食用', title:'熟冻盐田虾', production:'产地:河北省唐山市', }, { img:'./img/wing.jpg', price:'价格:116.00元/箱', desc:'简介:鸡肉, 充分熟制后食用', title:'翅根', production:'产地:山东省滨州市', }, ] </script> </html>例如这个代码我想要把数组里的数据读取出来具体怎么实现,在原代码的基础上整改
10-19
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Document</title> <style type="text/css"> .tomact { display: flex; width: 100%; height: 1060px; background-color: #03274b; } .head { width: 1410px; height: 1070px; } .info { width: 1400px; height: 810px; } .info-th { width: 1400px; height: 810px; } .item { width: 490px; height: 100px; background-color: #03274b; position: absolute; top: 1%; left: 24%; } .item-th { display: flex; justify-content: center; align-items: center; height: 100px; color: white; font-size: 50px; } .item-th p { margin-top: 40px; } .text { display: flex; width: 1400px; height: 250px; background-color: #03274b; box-shadow: inset 0 0 50px 2px hwb(214 7% 45%); } .origin { margin: 55px 0; width: 400px; height: 165px; border-right: 3px solid hwb(214 7% 45%); } .origin-th { margin: auto; width: 65%; font-weight: bolder; color: white; font-size: 35px; font-family: Serif; } .origin-th p { margin-top: 0; line-height: 1; } .profile { margin: 55px 0; width: 540px; height: 165px; border-right: 3px solid hwb(214 7% 45%); } .profile-th { margin: auto; width: 75%; font-weight: bolder; color: white; font-size: 35px; font-family: Serif; } .profile-th p { margin-top: 0; line-height: 1; } .price { margin: 55px 0; width: 470px; height: 165px; } .price-th { margin: auto; width: 70%; font-weight: bolder; color: white; font-size: 35px; font-family: Serif; } .price-th p { margin-top: 0; line-height: 1; } .price-th label { color: yellow; } .sidebar { width: 495px; height: 1060px; background-color: #03274b; box-shadow: inset 0 0 50px 2px hwb(214 7% 45%); position: absolute; right: 0; padding: 30px; box-sizing: border-box; } .sidebar h2 { font-size: 30px; color: white; text-align: center; margin-bottom: 50px; margin-top: 70px; font-family: Serif; } .sidebar p { font-size: 25px; margin: 0 20px; color: white; line-height: 1.5; margin-bottom: 60px; font-family: Serif; } .sidebar .image-placeholder { width: 90%; height: 180px; background-color: #0066cc; display: block; margin: 40px auto; color: #fff; } </style> </head> <body> <div class="tomact"> <div class="head"> <div class="info"> <img id="image" class="info-th" src="/img/chicken.jpg" /> <div class="item"> <div class="item-th"> <p id="title"></p> </div> </div> </div> <div class="text"> <div class="origin"> <div class="origin-th" > <p>产地:</p> <p id="production"></p> </div> </div> <div class="profile"> <div class="profile-th"> <p>简介:</p> <p id="desc"></p> </div> </div> <div class="price"> <div class="price-th"> <p>价格:</p> <p><label id="price"></label>元/箱</p> </div> </div> </div> </div> <div class="sidebar"> <h2>公司名称</h2> <p> 简介: 文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容内容文字内容文字内容文字内容文字内容 </p> <div class="image-placeholder"></div> <div class="image-placeholder"></div> </div> </div> </body> <script> const list = [ { img: './img/chicken.jpg', price: '103.00', desc: '鸡腿, 充分熟制后食用', title: '琵琶腿', production: '山东省临沂市' }, { img: './img/butterfly.jpg', price: '195.00', desc: '南美白对虾、水、食用盐、复配水分保持剂,将产品拆袋解冻清洗干净,加热至熟后食用', title: '国美生蝴蝶虾51/60', production: '广东省湛江市' }, { img: './img/drumette.jpg', price: '155.00', desc: '精选鸡翅,微波、烧烤、油炸', title: '安大调理翅根', production: '山东省潍坊市' }, { img: './img/edamame.jpg', price: '100.00', desc: '小青豆, 适合解冻烹饪使用', title: '速冻毛豆仁', production: '浙江省杭州市' }, { img: './img/fragrant.jpg', price: '354.00', desc: '对虾、纯净水, 充分熟制后食用', title: '8/12盐田虾', production: '海南省琼海市' }, { img: './img/hairtail.jpg', price: '345.00', desc: '带鱼、唐扬粉(小麦粉、淀粉、米粉、香辛料、白砂糖)、酱油、食用盐', title: '秘制带鱼M', production: '浙江省舟山市' }, { img: './img/pack.jpg', price: '120.00', desc: '毛豆仁, 适合解冻烹饪使用', title: '速冻甜青豆中(白)', production: '浙江省杭州市' }, { img: './img/joint.jpg', price: '325.00', desc: '精选鸡翅,微波、烧烤、油炸', title: '安大奥尔良翅中(绿胶带)', production: '山东省潍坊市' }, { img: './img/leg.jpg', price: '116.00', desc: '鸡肉, 充分熟制后食用', title: '毛毛肉', production: '山东省济南市' }, { img: './img/maize.jpg', price: '66.00', desc: '玉米粒, 解冻烹饪后使用', title: '速冻甜玉米粒', production: '浙江省杭州市' }, { img: './img/meat.jpg', price: '180.00', desc: '南美白对虾、水、食用盐、复配水分保持剂,充分烹调后可食用', title: '国美生虾仁60/70', production: '广东省湛江市' }, { img: './img/media.jpg', price: '420.00', desc: '鸡肉, 充分熟制后食用', title: '40/50翅中', production: '山东省滨州市' }, { img: './img/pork.jpg', price: '440.00', desc: '带骨猪肉,充分熟制后食用', title: '猪肋排', production: '浙江省杭州市' }, { img: './img/prawn.jpg', price: '0.00', desc: '盐田虾,解冻后加水和生姜烧沸关火,将熟虾入沸水中浸泡1分钟,蘸料食用', title: '熟冻盐田虾', production: '河北省唐山市' }, { img: './img/wing.jpg', price: '116.00', desc: '鸡肉, 充分熟制后食用', title: '翅根', production: '山东省滨州市' } ] const params = new URLSearchParams(window.location.search); const title = params.get('title'); const index = list.findIndex(course => course.title === title); document.querySelector("#image").src=list[index].img document.querySelector("#title").src=list[index].title document.querySelector("#price").src=list[index].price document.querySelector("#desc").src=list[index].desc document.querySelector("#production").src=list[index].production </script> </html> 具体分析为什么加了id属性后不显示
最新发布
10-19
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值