/* @flow */ let decoder export function decode (html: string): string { decoder = decoder || document.createElement('div') decoder.innerHTML = html re... ...
分类:
Web程序 时间:
2017-07-27 18:14:02
阅读次数:
188
<!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title></title> <script> //创建select元素 function createSelect(){ var ele = document.createElement('s ...
分类:
其他好文 时间:
2017-07-27 17:03:00
阅读次数:
146
一、DOM写XML文件 #导入minidom from xml.dom import minidom # 1.创建DOM树对象 dom=minidom.Document() # 2.创建根节点。每次都要用DOM对象来创建任何节点。 root_node=dom.createElement('root' ...
分类:
编程语言 时间:
2017-07-22 19:40:49
阅读次数:
423
AMUI.qrcode.prototype.createCanvas = function(qrCodeAlg) { //创建canvas节点 var canvas = document.createElement('canvas'); ... ...
分类:
其他好文 时间:
2017-07-21 17:11:10
阅读次数:
167
1. 添加/删除元素 2. ***HTML DOM常用对象 select/option table/行分组/tr/td form 1. 添加/删除元素: 添加: 3步: 1. 创建新的空元素: var a=document.createElement("a"); 相当于: <a></a> 2. 设置 ...
分类:
其他好文 时间:
2017-07-18 13:21:05
阅读次数:
114
在末尾添加节点案例 步骤 1、获取到ul标签2、创建li标签 document.createElement("标签名称");3、创建文本 document.createTextNode("文本内容");4、把文本添加到li标签 使用appendChild()方法5、把li标签添加到ul标签 使用ap ...
分类:
其他好文 时间:
2017-07-13 20:25:52
阅读次数:
107
(function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol 'https') { bp.src = ...
分类:
其他好文 时间:
2017-07-12 13:39:55
阅读次数:
135
function copyTextToClipboard(text) { var textArea = document.createElement("textarea"); textArea.style.background = 'transparent'; textArea.value = te ...
分类:
Web程序 时间:
2017-07-10 14:24:49
阅读次数:
250
转自网络 一、创建元素节点 1.1 原生JS创建元素节点 ? 1 document.createElement("p"); ? 1 document.createElement("p"); ? 1 document.createElement("p"); ? 1 document.createEle ...
分类:
Web程序 时间:
2017-07-10 00:35:25
阅读次数:
389
document.setTitle = function(t) { document.title = t; var i = document.createElement('iframe'); i.src = '//m.baidu.com/favicon.ico'; i.style.display = ...
分类:
微信 时间:
2017-07-08 14:09:58
阅读次数:
321