![](/img/trans.png)
[英]How to get css islolation random string
我用CSS隔離。 這是 output html 代碼: CSS隔離生成的隨機字符串是: b-1yc1hoca3 我在頁面加載后添加了一些 html 代碼。 添加上述代碼時,上述代碼沒有 CSS 隔離隨機字符串 ( b-1yc1hoca3 ) 並且 CSS 代碼不適用於該元素。 如何將 CSS 隔離 ...
[英]How to get css islolation random string
我用CSS隔離。 這是 output html 代碼: CSS隔離生成的隨機字符串是: b-1yc1hoca3 我在頁面加載后添加了一些 html 代碼。 添加上述代碼時,上述代碼沒有 CSS 隔離隨機字符串 ( b-1yc1hoca3 ) 並且 CSS 代碼不適用於該元素。 如何將 CSS 隔離 ...
[英]How to get the td that contains tr with a button that has a specific attribute?
我正在嘗試獲取一個表中的所有 tds,該表包含一個 tr 和一個按鈕,我已經向該按鈕指定了一個具有 true 或 false 值的屬性(“布爾值”)。 我需要獲取每個具有該屬性且值為 true 的 td,但我不知道如何使用 jquery 獲取它。 結構如下: 我試圖做這樣的事情: 但我不能從那里 ...
[英]jquery `.find()` use with `:not` selector is missing some elements (the selector is affected by the `.find()` invoking element, but it shouldnt)
問題我有一個元素$(elt_Main) ( <span id="a"> ) 我打電話給$(elt_Main).find(selector); 在上面使用選擇器selector = ':not(span span)'; 但是 jquery 並沒有給出我想要的所有子元素。 前 [test1 ...
[英]How can I change between a Login/Sign up Form?
我正在做一個必須創建網站的項目。 目前我正在制作登錄/注冊表單,但是我不知道如何使用鏈接在它們之間進行更改。 這是我的 html 代碼: 這是我的 JavaScript 代碼: 我試圖通過向 class="form__text" 行添加一個 id 然后將其連接到 javascript 來解決此問題 ...
[英]How to use Tom-select dynamically?
在我的模式中有一個包含 Tom 選擇輸入的表。 我還制作了一個添加按鈕來添加 Tom 選擇輸入。 因此,當我單擊添加按鈕時,我克隆了包含 tomselect 輸入的 ,但是克隆的 tr 中的 tom-select 輸入不起作用...如何動態使用 tom-select 輸入? 這是我的代碼.. 克隆 ...
[英]puppeteer QuerySelectorAll not working is vs-code Node.js
上面的代碼工作正常但是當我在 devTools 中運行查詢時給我一個空數組它給了我結果但不是在 vs-Code 中,我試圖設置視口屏幕最大大小以檢查是否可以無頭打開它在小屏幕尺寸和可能是 class 差異但問題仍然存在。 我也嘗試了 setTimeOut 方法可能是文檔沒有加載但問題仍然沒有解決, ...
[英]Javascript class add/remove only working once
我正在嘗試編寫一些 js,在單擊時將額外的 class of.active 添加到已存在的 class called.option 中。 以及從帶有兩個 classes.option.active 的任何 div 中刪除 said.active class。 這是我到目前為止所擁有的 控制台正在返回 ...
[英]Get outerHTML text in div
我正在使用 Google 跟蹤代碼管理器,但在獲取 outerHTML 文本時遇到問題。 我嘗試了多種方法,但無法正常工作。 console.log(document.querySelector("div.a").outerHTML); console.log(document.querySelec ...
[英]change properties of two divs with one onclick and querySelectorAll()
我有多個元素在兩個 div 中是分開的。 第一個 div 包含文本,第二個 div 包含顏色。 當我點擊一個元素時,文本和顏色應該改變,如果我再次點擊它,它應該變回來。 問題是無論我點擊哪一個,它總是最后一個改變的。 HTML部分: JavaScript部分: 它有效,當我只使用一個 div 時 ...
[英]Datatables - how to retain filter data and reassign them to dropdowns
我正在使用 Jquery 數據表,它具有下拉列表形式的過濾器。 HTML 如下所示。 過濾器下拉列表可以在任何列中,因為它在具有不同數據集的許多地方使用。 因此,我使用 Datatable 提供的方法使其動態化,並設法使用過濾器下拉列表找到<td>元素。 在上面的代碼片段中, i是來自 ...
[英]How to count a number of a certain option was clicked?
我們有一個下拉菜單,允許用戶使用 select 汽車制造商,另一個允許用戶使用 select 汽車 Model When Audi is chosen.. These values are in a table in the database and when the options are ...
[英]How to deselect select input with jquery?
我將此鏈接用於 HTML 頁面中的 select 選項(下面的 select2)。 我的鱈魚也存在於JSFiddle中。 我想用 JQuery 取消選擇所有。 我使用了很多代碼,但不適用於此選項。 或者 或者 ...
[英]can I query select the Parent from child in Javascript?
如何使用 querySelector 從子元素到 select 父元素? 在我的示例中,HTML 結構是這樣的:<label> <input/> <!-- I know only this --> </label> 而在 html 我所知道的只 ...
[英]Getting second and third elements out of an ordered list using jQuery
我們正在嘗試添加 class 並使用 jQuery 更改有序列表中第二個和第三個元素的圖像的 URL。 有序列表不能變為無序列表。 我們需要通過select兩個項目來添加class或者改變圖像。 我們只需要更改第二項和第三項的 src。 我們如何才能使用 select 第二和第三使用 jQuery。 ...
[英]JS - compare select option then make it selected
我們有幾個<select>字段需要在指定的<option>處設置。 我們有這個帶有 UUID 的“答案列表”。 每個<option>都會被評估:如果 UUID 包含在“答案列表”中,那么這就是選擇的<option> ,否則我們保持默認的“不可用” &l ...
[英]Create selector with id from ajax jquery
我正在接收來自我的 ajax 呼叫的 ID 和鏈接。 我必須使用 id 找到我的 tr,然后在 td 中顯示鏈接 class.center-xs 她是我的 HTML 代碼: ... ... 她是我的 Ajex 電話: ... ... ...
[英]Select the Audio inside same div and play without using id
如何在沒有元素 ID 的情況下使用 javascript 在同一 div 內單擊按鈕播放音頻? 我想用播放按鈕顯示默認的 html 播放器。 參考圖片 var audiofile = document.querySelectorAll('div[class$="audio-clip"]'); au ...
[英]How to return all unordered list items including links and links text?
它不需要 arguments 。 它返回所有無序列表項目(包括指向 Facebook、Instagram 和 Twitter 的鏈接的項目)。 它們應該是由 function querySelector或querySElectorAll 返回的 NodeList 對象。 常見錯誤提示:我們不僅僅尋 ...
[英]Form validation in ajax requires only the first input in the class to be filled
我正在嘗試對我的表單進行驗證。 我想這樣做,所以如果 class “必需”的任何項目為空,則不會提交表單。 目前,僅 class 中的第一項就是這種情況。 例如,我有 3 個輸入 class “必需” - 姓名、姓氏、地址。 當我只填寫姓名時,表格會發送,但姓氏和地址仍然是空的。 $('.requ ...
[英]How capture the input radio value in javascript?
例如,我在 html 中有下一個選項,為每個輸入無線電定義全局名稱和不同的 id: <form id="mokepon-form"> <input type="radio" name="mokepon" id="hipodoge"> <label for="h ...