摘要:
//判断容器当前有没有子级元素,如果没有直接appendChild就行了; if (p.children[0]) { p.insertBefore(span, p.children[0]); } else { p.appendChild(span); } 阅读全文
posted @ 2017-11-11 16:22
对三
阅读(835)
评论(0)
推荐(0)
摘要:
p.appendChild(span); 阅读全文
posted @ 2017-11-11 16:20
对三
阅读(416)
评论(0)
推荐(0)
摘要:
p.removeChild(p.children[0]); 阅读全文
posted @ 2017-11-11 16:17
对三
阅读(362)
评论(0)
推荐(0)
摘要:
p.replaceChild(nodeNext, p.children[j]); p.replaceChild(nodePrev, p.children[j + 1]); 阅读全文
posted @ 2017-11-11 16:14
对三
阅读(302)
评论(0)
推荐(0)
摘要:
var nodePrev = p.children[j].cloneNode(true); var nodeNext = p.children[j + 1].cloneNode(true); 阅读全文
posted @ 2017-11-11 16:12
对三
阅读(223)
评论(0)
推荐(0)
摘要:
function getStyle(ele, attr) { return ele.currentStyle ? ele.currentStyle[attr] : window.getComputedStyle(ele, null)[attr]; } 阅读全文
posted @ 2017-11-11 16:10
对三
阅读(156)
评论(0)
推荐(0)
摘要:
p.onclick = function (event) { var e = event || window.event, target = e.target ? e.target : e.srcElement; if (target.tagName === 'SPAN') { p.removeChild(target... 阅读全文
posted @ 2017-11-11 09:56
对三
阅读(210)
评论(0)
推荐(0)

浙公网安备 33010602011771号