84669 personnes étudient
152542 personnes étudient
20005 personnes étudient
5487 personnes étudient
7821 personnes étudient
359900 personnes étudient
3350 personnes étudient
180660 personnes étudient
48569 personnes étudient
18603 personnes étudient
40936 personnes étudient
1549 personnes étudient
1183 personnes étudient
32909 personnes étudient
js可以替换或删掉选中文本吗?是否要给文本节点添加onfocus事件。
学习是最好的投资!
在控制台依次执行以下代码。
// 1. 设置整个页面为可编辑状态 document.body.setAttribute('contenteditable', true) // 2. 全选 document.execCommand('selectAll') // 3. 剪切 document.execCommand('cut')
你想剪贴什么内容,就设置那个地方的可编辑状态,然后执行命令。
没太懂,选中然后删掉对应的dom?
在控制台依次执行以下代码。
你想剪贴什么内容,就设置那个地方的可编辑状态,然后执行命令。
没太懂,选中然后删掉对应的dom?