ChatGPT解决这个技术问题 Extra ChatGPT

如何使用 jQuery 按名称选择元素?

我有一个表格列,我正在尝试展开和隐藏。当我通过 class 而不是通过元素的 name 选择它时,jQuery 似乎隐藏了 <td> 元素。

例如:

$(".bold").hide(); // Selecting by class works.
$("tcol1").hide(); // Selecting by name does not work.

请注意下面的 HTML。对于所有行,第二列具有相同的 name。如何使用 name 属性创建此集合?

<tr>
  <td>data1</td>
  <td name="tcol1" class="bold"> data2</td>
</tr>
<tr>
  <td>data1</td>
  <td name="tcol1" class="bold"> data2</td>
</tr>
<tr>
  <td>data1</td>
  <td name="tcol1" class="bold"> data2</td>
</tr>
问题与内容不符。 ID和名称是不同的属性,选择的方式也不同
拥有相同 ID 的元素是违反 W3C 标准的;即重复的 ID 是不可以的。
CSS specification 包含一个新的列组合符,因此如果您有 <colgroup><col class="firstColumn"/><col class="secondColumn"/></colgroup>,您很快就可以简单地选择 document.querySelectorAll("td || col.secondColumn")

S
Sebastian Simon

您可以使用 jQuery attribute selector

$('td[name="tcol1"]')   // Matches exactly 'tcol1'
$('td[name^="tcol"]' )  // Matches those that begin with 'tcol'
$('td[name$="tcol"]' )  // Matches those that end with 'tcol'
$('td[name*="tcol"]' )  // Matches those that contain 'tcol'

@Varun - 您可以省略 td ... 例如 $('[name^=tcol]') 将匹配所有具有属性 'name' 且值以 'tcol' 开头的元素
m
matpie

可以使用 [attribute_name=value] 方式选择任何属性。请参阅示例 here

var value = $("[name='nameofobject']");

A
Al Foиce ѫ

如果你有类似的东西:

<input type="checkbox" name="mycheckbox" value="11" checked="">
<input type="checkbox" name="mycheckbox" value="12">

你可以这样阅读:

jQuery("input[name='mycheckbox']").each(function() {
    console.log( this.value + ":" + this.checked );
});

片段:

jQuery("input[name='mycheckbox']").each(function() { console.log( this.value + ":" + this.checked ); });


A
Al Foиce ѫ

您可以通过名称以老式方式获取元素数组并将该数组传递给 jQuery。

函数 toggleByName() { var arrChkBox = document.getElementsByName("chName"); $(arrChkBox).toggle(); } 沙盒



注意:您唯一有理由使用“名称”属性的情况应该是复选框或单选输入。

或者您可以将另一个类添加到元素中以供选择。(这就是我要做的)

函数 toggleByClass(bolShow) { if (bolShow) { $(".rowToToggle").show(); } 其他 { $(".rowToToggle").hide(); } } sandBox</标题> </head> <body> <table> <tr> <td>data1</td> <td class="bold rowToToggle">data2</td> </tr> <tr> <td>data1</ td> <td class="bold rowToToggle">data2</td> </tr> <tr> <td>data1</td> <td class="bold rowToToggle">data2</td> </tr> < /table> <input type="button" onclick="toggleByClass(true);" value="show"/> <input type="button" onclick="toggleByClass(false);" value="hide"/> </body> </html> </p> <p class="mb-0 text-dark "> </p> <hr class="my-4"> <div> </div> </div> </div> </div> </div> </div> <div class="d-flex mb-4"> <div><span class="avatar avatar-md avatar-success"> <span class="avatar-initials rounded-circle">A</span> </span></div> <div class=" ms-3 w-100"> <small>Al Foиce ѫ</small> <div class="d-flex w-100"> <!-- card --> <div class="card mt-2 rounded bg-light w-100"> <div class="card-body p-3"> <p class="mb-0 text-dark "> 您可以使用 jQuery 中的 name 元素从输入字段中获取名称值,方法是: </p> <p class="mb-0 text-dark "> </p> <p class="mb-0 text-dark "> var firstname = jQuery("#form1 input[name=firstname]").val(); //返回 ABCD var lastname = jQuery("#form1 input[name=lastname]").val(); //返回 XYZ console.log(firstname);控制台.log(姓氏); <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <form name="form1" id="form1"> < input type="text" name="firstname" value="ABCD"/> <input type="text" name="lastname" value="XYZ"/> </form> </p> <p class="mb-0 text-dark "> </p> <hr class="my-4"> <div> </div> </div> </div> </div> </div> </div> <div class="d-flex mb-4"> <div><span class="avatar avatar-md avatar-success"> <span class="avatar-initials rounded-circle">i</span> </span></div> <div class=" ms-3 w-100"> <small>itsnikolay</small> <div class="d-flex w-100"> <!-- card --> <div class="card mt-2 rounded bg-light w-100"> <div class="card-body p-3"> <p class="mb-0 text-dark "> 框架通常在表单中使用括号名称,例如: </p> <pre class="mb-0 bg-dark text-white p-2 text-break" style="white-space: pre-wrap; "><code><input name=user[first_name] /> </code></pre> <p class="mb-0 text-dark "> 它们可以通过以下方式访问: </p> <pre class="mb-0 bg-dark text-white p-2 text-break" style="white-space: pre-wrap; "><code>// in JS: this.querySelectorAll('[name="user[first_name]"]') // in jQuery: $('[name="user[first_name]"]') // or by mask with escaped quotes: this.querySelectorAll("[name*=\"[first_name]\"]") </code></pre> <hr class="my-4"> <div> </div> </div> </div> </div> </div> </div> <div class="d-flex mb-4"> <div><span class="avatar avatar-md avatar-success"> <span class="avatar-initials rounded-circle">P</span> </span></div> <div class=" ms-3 w-100"> <small>Paweł Tomkiel</small> <div class="d-flex w-100"> <!-- card --> <div class="card mt-2 rounded bg-light w-100"> <div class="card-body p-3"> <p class="mb-0 text-dark "> 我已经这样做了,它的工作原理: </p> <pre class="mb-0 bg-dark text-white p-2 text-break" style="white-space: pre-wrap; "><code>$('[name="tcol1"]') </code></pre> <p class="mb-0 text-dark "> <a href="https://api.jquery.com/attribute-equals-selector/">https://api.jquery.com/attribute-equals-selector/</a> </p> <hr class="my-4"> <div> </div> </div> </div> </div> </div> </div> <div class="d-flex mb-4"> <div><span class="avatar avatar-md avatar-success"> <span class="avatar-initials rounded-circle">C</span> </span></div> <div class=" ms-3 w-100"> <small>Chris J</small> <div class="d-flex w-100"> <!-- card --> <div class="card mt-2 rounded bg-light w-100"> <div class="card-body p-3"> <p class="mb-0 text-dark "> 您忘记了第二组引号,这使得接受的答案不正确: </p> <pre class="mb-0 bg-dark text-white p-2 text-break" style="white-space: pre-wrap; "><code>$('td[name="tcol1"]') </code></pre> <hr class="my-4"> <div> <div class="comment"> <div class="p-3 mb-2 bg-light border rounded"> 例如,如果字段名称是 <code>'td[name="nested[fieldName]"]'</code> </div> <div class="p-3 mb-2 bg-light border rounded"> 这是非常真实的。当遇到没有正确引用的基于属性的选择器元素时,较新版本的 jQuery (v. 3.2.1) 更有可能失败。 </div> </div> </div> </div> </div> </div> </div> </div> <div class="d-flex mb-4"> <div><span class="avatar avatar-md avatar-success"> <span class="avatar-initials rounded-circle">B</span> </span></div> <div class=" ms-3 w-100"> <small>Barry Michael Doyle</small> <div class="d-flex w-100"> <!-- card --> <div class="card mt-2 rounded bg-light w-100"> <div class="card-body p-3"> <p class="mb-0 text-dark "> 这是一个简单的解决方案:<code>$('td[name=tcol1]')</code> </p> <hr class="my-4"> <div> </div> </div> </div> </div> </div> </div> <div class="d-flex mb-4"> <div><span class="avatar avatar-md avatar-success"> <span class="avatar-initials rounded-circle">佚</span> </span></div> <div class=" ms-3 w-100"> <small>佚名</small> <div class="d-flex w-100"> <!-- card --> <div class="card mt-2 rounded bg-light w-100"> <div class="card-body p-3"> <p class="mb-0 text-dark "> 您可以将任何属性用作 <code>[attribute_name=value]</code> 的选择器。 </p> <pre class="mb-0 bg-dark text-white p-2 text-break" style="white-space: pre-wrap; "><code>$('td[name=tcol1]').hide(); </code></pre> <hr class="my-4"> <div> </div> </div> </div> </div> </div> </div> <div class="d-flex mb-4"> <div><span class="avatar avatar-md avatar-success"> <span class="avatar-initials rounded-circle">C</span> </span></div> <div class=" ms-3 w-100"> <small>Community</small> <div class="d-flex w-100"> <!-- card --> <div class="card mt-2 rounded bg-light w-100"> <div class="card-body p-3"> <p class="mb-0 text-dark "> 表现 </p> <p class="mb-0 text-dark "> 今天(2020.06.16)我在 Chrome 83.0、Safari 13.1.1 和 Firefox 77.0 上对 MacOs High Sierra 上的所选解决方案进行了测试。 </p> <p class="mb-0 text-dark "> 结论 </p> <p class="mb-0 text-dark "> 按名称获取元素 </p> <p class="mb-0 text-dark "> getElementByName (C) 对于大小数组的所有浏览器来说是最快的解决方案 - 但是我可能是某种延迟加载解决方案,或者它使用一些带有名称-元素对的内部浏览器哈希缓存 </p> <p class="mb-0 text-dark "> 混合js-jquery解决方案(B)比querySelectorAll(D)解决方案更快 </p> <p class="mb-0 text-dark "> 纯jquery解决方案(A)最慢 </p> <p class="mb-0 text-dark "> 按名称获取行并隐藏它们(我们从比较中排除预先计算的本机解决方案(I) - 理论上最快) - 它用作参考) </p> <p class="mb-0 text-dark "> 令人惊讶的是,混合 js-jquery 解决方案 (F) 在所有浏览器上都是最快的 </p> <p class="mb-0 text-dark "> 令人惊讶的是,预先计算的解决方案 (I) 比用于大表的 jquery (E,F) 解决方案慢 (!!!) - 我检查了隐藏元素上的 .hide() jQuery 方法设置样式“default:none” - 但看起来他们找到了比 element.style.display='none' 更快的方法 </p> <p class="mb-0 text-dark "> jquery (E) 解决方案在大表上非常快 </p> <p class="mb-0 text-dark "> jquery (E) 和 querySelectorAll (H) 解决方案对于小表最慢 </p> <p class="mb-0 text-dark "> getElementByName (G) 和 querySelectorAll (H) 解决方案对于大表来说非常慢 </p> <p class="mb-0 text-dark "> https://i.stack.imgur.com/2CTxE.png </p> <p class="mb-0 text-dark "> 细节 </p> <p class="mb-0 text-dark "> 我对按名称读取的元素(<a href="https://stackoverflow.com/a/1107264/860099">A</a>、<a href="https://stackoverflow.com/a/29392891/860099">B</a>、<a href="https://stackoverflow.com/a/1113018/860099">C</a>、<a href="https://stackoverflow.com/a/33175280/860099">D</a>)执行两个测试并隐藏该元素(E、F、G、H、I) </p> <p class="mb-0 text-dark "> 小桌子 - 3 行 - 你可以在这里运行测试 </p> <p class="mb-0 text-dark "> 大表 - 1000 行 - 你可以在这里运行测试 </p> <p class="mb-0 text-dark "> 下面的片段显示了使用的代码 </p> <p class="mb-0 text-dark "> </p> <p class="mb-0 text-dark "> //https://stackoverflow.com/questions/1107220/how-can-i-select-an-element-by-name-with-jquery# // https://jsbench.me/o6kbhyyvib/1 // https ://jsbench.me/2fkbi9rirv/1 函数 A() { return $('[name=tcol1]'); } 函数 B() { 返回 $(document.getElementsByName("tcol1")) } 函数 C() { 返回 document.getElementsByName("tcol1") } 函数 D() { 返回 document.querySelectorAll('[name=tcol1] ') } 函数 E() { $('[name=tcol1]').hide(); } 函数 F() { $(document.getElementsByName("tcol1")).hide(); } 函数 G() { document.getElementsByName("tcol1").forEach(e=>e.style.display='none'); } function H() { document.querySelectorAll('[name=tcol1]').forEach(e=>e.style.display='none'); } 函数 I() { 让 elArr = [...document.getElementsByName("tcol1")]; let length = elArr.length for(let i=0; i<length; i++) elArr[i].style.display='none'; } // ----------- // 测试 // ----------- function reset() { $('td[name=tcol1]').show() ; } [A,B,C,D].forEach(f=> console.log(`${f.name} rows: ${f().length}`)) ; <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <div>此片段仅显示使用过的代码</div> <表> <tr> <td>data1</td> <td name="tcol1" class="bold"> data2</td> </tr> <tr> <td>data1</td> <td name= "tcol1" class="bold"> data2</td> </tr> <tr> <td>data1</td> <td name="tcol1" class="bold"> data2</td> </tr > </table> <button onclick="E()">E: 隐藏</button> <button onclick="F()">F: 隐藏</button> <button onclick="G()">G : 隐藏</button> <button onclick="H()">H: 隐藏</button> <button onclick="I()">I: 隐藏</button><br> <button onclick="reset( )">重置</button> </p> <p class="mb-0 text-dark "> </p> <p class="mb-0 text-dark "> Chrome 上的示例结果 </p> <p class="mb-0 text-dark "> https://i.stack.imgur.com/iyjpp.png </p> <hr class="my-4"> <div> <div class="comment"> <div class="p-3 mb-2 bg-light border rounded"> 很棒的信息,但是很多东西没有回答这个问题,这只是相关的知识 </div> </div> </div> </div> </div> </div> </div> </div> <div class="d-flex mb-4"> <div><span class="avatar avatar-md avatar-success"> <span class="avatar-initials rounded-circle">H</span> </span></div> <div class=" ms-3 w-100"> <small>HoldOffHunger</small> <div class="d-flex w-100"> <!-- card --> <div class="card mt-2 rounded bg-light w-100"> <div class="card-body p-3"> <p class="mb-0 text-dark "> 就个人而言,我过去所做的就是给他们一个通用的类 id 并用它来选择它们。这可能并不理想,因为他们指定了一个可能不存在的类,但它使选择变得容易得多。只要确保你的类名是独一无二的。 </p> <p class="mb-0 text-dark "> 即,对于上面的示例,我将按类别使用您的选择。最好将类名从粗体更改为“tcol1”,这样您就不会意外包含到 jQuery 结果中。如果粗体实际上确实引用了一个 CSS 类,您总是可以在类属性中同时指定这两者 - 即 'class="tcol1 bold"'。 </p> <p class="mb-0 text-dark "> 总之,如果您不能按名称选择,请使用复杂的 jQuery 选择器并接受任何相关的性能损失,或者使用类选择器。 </p> <p class="mb-0 text-dark "> 您始终可以通过包含表名来限制 jQuery 范围,即 $('#tableID > .bold') </p> <p class="mb-0 text-dark "> 这应该限制 jQuery 搜索“世界”。 </p> <p class="mb-0 text-dark "> 它仍然可以归类为复杂的选择器,但它很快将任何搜索限制在 ID 为“#tableID”的表内,因此将处理保持在最低限度。 </p> <p class="mb-0 text-dark "> 如果您要在 #table1 中查找超过 1 个元素,则另一种方法是单独查找,然后将其传递给 jQuery,因为这会限制范围,但每次查找时都会节省一些处理时间。 </p> <pre class="mb-0 bg-dark text-white p-2 text-break" style="white-space: pre-wrap; "><code>var tbl = $('#tableID'); var boldElements = $('.bold',tbl); var rows = $('tr',tbl); if (rows.length) { var row1 = rows[0]; var firstRowCells = $('td',row1); } </code></pre> <hr class="my-4"> <div> </div> </div> </div> </div> </div> </div> <div class="d-flex mb-4"> <div><span class="avatar avatar-md avatar-success"> <span class="avatar-initials rounded-circle">C</span> </span></div> <div class=" ms-3 w-100"> <small>CalebHC</small> <div class="d-flex w-100"> <!-- card --> <div class="card mt-2 rounded bg-light w-100"> <div class="card-body p-3"> <p class="mb-0 text-dark "> 您可以通过使用它的 ID 属性来获取 JQuery 中的元素,如下所示: </p> <pre class="mb-0 bg-dark text-white p-2 text-break" style="white-space: pre-wrap; "><code>$("#tcol1").hide(); </code></pre> <hr class="my-4"> <div> <div class="comment"> <div class="p-3 mb-2 bg-light border rounded"> OP 按名称而不是 id 询问 </div> <div class="p-3 mb-2 bg-light border rounded"> 为什么这个答案会出现在顶部? </div> <div class="p-3 mb-2 bg-light border rounded"> @Marcus,因为这是所有答案中最激进的答案。 </div> <div class="p-3 mb-2 bg-light border rounded"> @dylanh724 这个问题最初是关于按名称查找的。 </div> </div> </div> </div> </div> </div> </div> </div> <div class="d-flex mb-4"> <div><span class="avatar avatar-md avatar-success"> <span class="avatar-initials rounded-circle">m</span> </span></div> <div class=" ms-3 w-100"> <small>mastisa</small> <div class="d-flex w-100"> <!-- card --> <div class="card mt-2 rounded bg-light w-100"> <div class="card-body p-3"> <p class="mb-0 text-dark "> 您可以使用以下功能: </p> <pre class="mb-0 bg-dark text-white p-2 text-break" style="white-space: pre-wrap; "><code>get.elementbyId(); </code></pre> <hr class="my-4"> <div> <div class="comment"> <div class="p-3 mb-2 bg-light border rounded"> OP 想要<b>按名称</b>,而不是 id。 <code>get.elementbyId()</code> 是什么?您是说 <code>document.getElementById()</code> 吗? </div> <div class="p-3 mb-2 bg-light border rounded"> 不,他要求按名称选择一个元素。 </div> </div> </div> </div> </div> </div> </div> </div> </p> </div> </div> <div class="col-xl-3"> <div class="d-flex flex-row justify-content-start align-items-center bg-light mb-3 mt-8 py-2 rounded"> <div class="flex-fill"> <span class="avatar avatar-xl "> <img src='https://huntsbot-hz-assets.oss-cn-hangzhou.aliyuncs.com/huntsbot/assets/images/brand/qrcode_for_gh.jpg?t=20230125' class="rounded w-100 mx-2" alt="关注公众号,不定期副业成功案例分享"/> </span> </div> <div class="flex-fill text-left"> <div class="mx-1"> <h5 class="mb-2 mt-3 ">关注公众号</h5> <p>不定期副业成功案例分享</p> </div> </div> </div> <div class="card card-bordered mb-0 card-hover cursor-pointer"> <div class="card-body"> <h4 class="py-2"> 想<span class="text-danger">领先一步</span>获取最新的外包任务吗? </h4> <a type="button" class="btn btn-sm btn-outline-primary rounded-pill w-100" href="/admin/payments.html" >立即订阅</a> </div> </div> <div class="mt-2 cursor-pointer"> <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-8339074668991438" crossorigin="anonymous"></script> <!-- huntsbot-details --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-8339074668991438" data-ad-slot="7889891166" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> <div class="card mb-4 mt-4 border"> <div> <!-- Card header --> <div class="card-header"> <h4 class="mb-0">相似问题</h4> </div> <ul class="list-group list-group-flush"> <li class="list-group-item bg-transparent"> <a href="/qa/xMlx">如何使用 jQuery 异步上传文件?</a> </li> <li class="list-group-item bg-transparent"> <a href="/qa/5DZM">如何检查元素是否隐藏在 jQuery 中?</a> </li> <li class="list-group-item bg-transparent"> <a href="/qa/w71Q">如何使用 JavaScript 更改元素的类?</a> </li> <li class="list-group-item bg-transparent"> <a href="/qa/XWjE">使用 jQuery 为复选框设置“选中”</a> </li> <li class="list-group-item bg-transparent"> <a href="/qa/bLbA">我如何知道通过 jQuery 选择了哪个单选按钮?</a> </li> <li class="list-group-item bg-transparent"> <a href="/qa/kan6">如何在 jQuery 中选择具有多个类的元素?</a> </li> <li class="list-group-item bg-transparent"> <a href="/qa/07lM">使用 jQuery 从下拉列表(选择框)中获取选定的文本</a> </li> <li class="list-group-item bg-transparent"> <a href="/qa/6Lka">如何从数组中删除特定项目?</a> </li> </ul> </div> </div> </div> </div> </div> </div> <!-- footer --> <div class="pt-lg-5 pt-3 footer bg-white"> <div class="container"> <div class="row"> <div class="col-lg-4 col-md-6 col-12"> <div class="mb-4"> <img src='https://huntsbot-hz-assets.oss-cn-hangzhou.aliyuncs.com/huntsbot/assets/images/brand/logo/logo.png?t=20230125' style="width:30%"> <div class="mt-4"> <p> HuntsBot(狩猎机器人),一站式外包任务、远程工作、产品创意分享与订阅平台,支持钉钉、飞书、企业微信、邮箱、Telegram机器人订阅。平台会以及时、稳定、可靠的技术把外包任务需求、远程工作机会、产品创意等推送给每一位订阅的用户。 </p> <div class="fs-4 mt-4"> <div class="btn-group dropup"> <button type="button" class="btn btn-primary dropdown-toggle fe fe-globe " data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> 简体中文 </button> <div class="dropdown-menu"> <a class="dropdown-item" href="https://www.huntsbot.com/qa/5DvA?lang=zh_CN"> 简体中文 </a> <a class="dropdown-item" href="https://www.huntsbot.com/qa/5DvA?lang=en_US"> English </a> </div> </div> </div> </div> </div> </div> <div class="offset-lg-1 col-lg-2 col-md-3 col-6 hidden-less750"> <div class="mb-4"> <h3 class="fw-bold mb-3"> 平台 </h3> <ul class="list-unstyled nav nav-footer flex-column nav-x-0"> <li> <a href="/telework.html" class="nav-link"> 外包任务 </a> </li> <li> <a href="/remote-job.html" class="nav-link"> 远程工作 </a> </li> <li> <a href="/products.html" class="nav-link"> 产品创意 </a> </li> <li> <a href="/pages/client.html" class="nav-link"> 发布需求 </a> </li> <li> <a href="/weekly.html" class="nav-link"> 周刊 </a> </li> <li> <a href="/pages/price.html" class="nav-link"> 订阅更新 </a> </li> </ul> </div> </div> <div class="col-lg-2 col-md-3 col-6 hidden-less750"> <div class="mb-4"> <h3 class="fw-bold mb-3"> 支持 </h3> <ul class="list-unstyled nav nav-footer flex-column nav-x-0"> <li> <a href="/pages/about.html" class="nav-link"> 关于我们 </a> </li> <li> <a href="/pages/faq.html" class="nav-link"> 帮助中心 </a> </li> <li> <a href="/pages/faq.html" class="nav-link"> 如何订阅 </a> </li> </ul> <h3 class="fw-bold my-3"> 友情链接 </h3> <ul class="list-unstyled nav nav-footer flex-column nav-x-0"> <li> <a href="https://tlr.xinbeitime.com/" class="nav-link" target="_blank"> 网球实时排名 </a> </li> <li> <a href="https://snapvideotools.com/" class="nav-link" target="_blank"> SnapVideoTools </a> </li> <li> <a href="https://tennisliveranking.com/" class="nav-link" target="_blank"> ATP/WTA/ITF Live Ranking </a> </li> </ul> </div> </div> <div class="col-lg-3 col-md-12 hidden-less750"> <!-- contact info --> <div class="mb-4"> <h3 class="fw-bold mb-3"> 联系我们 </h3> <p> 在使用过程中有任何问题或建议,可以通过以下方式联系我们: </p> <p class="mb-1"> 微信公众号: <a href="#" data-bs-toggle="modal" data-bs-target="#showQrCodeModel"> 火星来客 </a> </p> <p> Email: <a href="mailto:huntsbot@xinbeitime.com"> huntsbot@xinbeitime.com </a> </p> </div> </div> </div> <div class="row align-items-center g-0 border-top py-2 mt-6"> <!-- Desc --> <div class="col-lg-8 col-md-7 col-12"> <span class="fs-5"> Copyright© 2022-2023 www.huntsbot.com <a href="https://beian.miit.gov.cn/" rel="noindex,nofollow" target="_blank" class="text-reset">浙ICP备2022000860号-4</a> All Rights Reserved. </span> </div> <!-- Links --> <div class="col-lg-4 col-md-5 col-12 d-md-flex justify-content-end hidden-less750"> <nav class="nav nav-footer"> <a class="nav-link ps-0" href="/pages/disclaimer.html" target="_blank"> 免责声明 </a> <a class="nav-link px-2 px-md-3" href="/pages/privacy_policy.html" target="_blank"> 隐私协议 </a> <a class="nav-link px-2 px-md-3" href="/pages/terms_of_ervice.html" target="_blank"> 用户协议 </a> </nav> </div> </div> </div> </div> <!-- Modal --> <div class="modal fade" id="showQrCodeModel" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal-dialog modal-sm" role="document"> <div class="modal-content "> <div class="modal-header"> <h5 class="modal-title " id="exampleModalLabel">微信公众号</h5> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"> </button> </div> <div class="modal-body"> <img src='https://huntsbot-hz-assets.oss-cn-hangzhou.aliyuncs.com/huntsbot/assets/images/brand/qrcode_for_gh.jpg?t=20230125' class="rounded w-100" title="火星来客微信公众号" alt="火星来客微信公众号"> </div> </div> </div> </div> <div class="modal fade" id="modal-alert" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal-dialog modal-dialog-centered " role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="modal-alert-title" >Tips</h5> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body" id="modal-alert-body"> </div> </div> </div> </div> <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#modal-alert" style="display:none" id="btn-common-alert"></button> <div class="modal fade" id="model-confirm" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal-dialog modal-dialog-centered modal-sm" role="document"> <div class="modal-content"> <div class="modal-body" id="modal-confirm-body"></div> <div class="modal-footer"> <button type="button" class="btn btn-secondary btn-sm" data-bs-dismiss="modal">取消</button> <button type="button" class="btn btn-primary btn-sm" id="btn-confirm-yes" btn-type="ajaxButton">确定</button> </div> </div> </div> </div> <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#model-confirm" style="display:none" id="btn-common-confirm" ></button> <script > function alertError(message){ alertError(message,"Tips"); } function alertError(message,title){ if(title){ $("#modal-alert-title").html(title); } $("#modal-alert-body").html(message); $("#btn-common-alert").trigger("click"); } function confirmDialog(confirmMessage,actionUrl,actionSuccessMsg){ $("#modal-confirm-body").html(confirmMessage); $("#btn-confirm-yes").attr("data-url",actionUrl); $("#btn-confirm-yes").attr("data-message",actionSuccessMsg); $("#btn-common-confirm").trigger("click"); } </script> <!-- Scripts --> <!-- Libs JS --> <script src='https://huntsbot-hz-assets.oss-cn-hangzhou.aliyuncs.com/huntsbot/assets/libs/jquery/dist/jquery.min.js?t=20230125'></script> <script src='https://huntsbot-hz-assets.oss-cn-hangzhou.aliyuncs.com/huntsbot/assets/libs/bootstrap/dist/js/bootstrap.bundle.min.js?t=20230125'></script> <script src='https://huntsbot-hz-assets.oss-cn-hangzhou.aliyuncs.com/huntsbot/assets/libs/bootstrap-select/dist/js/bootstrap-select.min.js?t=20230125'></script> <script src='https://huntsbot-hz-assets.oss-cn-hangzhou.aliyuncs.com/huntsbot/assets/libs/jquery.form/jquery.form.js?t=20230125'></script> <script src='https://huntsbot-hz-assets.oss-cn-hangzhou.aliyuncs.com/huntsbot/assets/js/custom.js?t=20230125'></script> <script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?b25fc3fcffc44e8dff36dde049b4ebc1"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script> <script type="text/javascript"> (function(c,l,a,r,i,t,y){ c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)}; t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i; y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y); })(window, document, "clarity", "script", "fco75ff5x7"); </script> <!-- Google tag (gtag.js) --> <script async src="https://www.googletagmanager.com/gtag/js?id=G-BTLS35QW08"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-BTLS35QW08'); </script> <script> (function(){ var el = document.createElement("script"); el.src = "https://lf1-cdn-tos.bytegoofy.com/goofy/ttzz/push.js?a01aa87a04ac652b13258f439e7407fed09ba9bea51f9e0f26ab91ccc91c1924bc434964556b7d7129e9b750ed197d397efd7b0c6c715c1701396e1af40cec962b8d7c8c6655c9b00211740aa8a98e2e"; el.id = "ttzz"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(el, s); })(window) </script> </body> </html>