以下是其中的一小段:
//Get userId,questionId and title
let btn0 = document.createElement('input');
btn0.type = "button";
btn0.value = 'Read Content';
btn0.onclick = () => {
console.clear();
let b = [["Item","String"]];
let c = document.querySelectorAll('div#un1')[0].children;
let a = Array.from(c);
a.forEach((e , i) => {
b.push([i + 1,e.innerText]);
});
localStorage.setItem("test",JSON.stringify(b));
console.log(JSON.stringify(b));
}
if(m0)m0.prepend(btn0);
我只是试图将btn0替换为btn1,将m0替换为m1,以便在不重写所有常见内容的情况下开始另一个代码片段.我最终使用了我写的东西,但我希望能够使用Chrome开发工具中的内置工具.
我希望你们中有谁比我更了解如何在Chrome Dev工具上使用替换工具.