window.alert = function(name){ var iframe = document.createElement("IFRAME"); iframe.style.display="none"; iframe.setAttribute("src", 'data:text/plain... ...
分类:
Web程序 时间:
2018-06-13 14:54:41
阅读次数:
180
匿名函数的使用 createTextnode 创建文本 createElement 创建元素 appendChild 将文本或元素追加 ...
分类:
编程语言 时间:
2018-06-09 23:19:47
阅读次数:
224
// 动态加载script $.load_script = function(xyUrl, callback) { var head = doc.getElementsByTagName('head')[0]; var script = doc.createElement('script'); sc... ...
分类:
其他好文 时间:
2018-06-04 14:32:52
阅读次数:
129
从本质上讲,JSX 只是为 React.createElement(component, props, ...children) 函数提供的语法糖。JSX代码: 1 2 3 <MyButton color="blue" shadowSize={2}> Click Me </MyButton> 1 2 ...
分类:
Web程序 时间:
2018-05-23 18:04:17
阅读次数:
235
打开新tab页的两种方式 1 a标签 function openwin(url) { var a = document.createElement("a"); a.setAttribute("href", url); a.setAttribute("target", "_blank"); a.set ...
分类:
其他好文 时间:
2018-05-23 14:58:02
阅读次数:
140
var newScript = document.createElement('script'); newScript.setAttribute("src", "http://192.168.255.14:8546/countrys_p.txt"); newScript.setAttribute("... ...
分类:
Web程序 时间:
2018-05-21 16:06:42
阅读次数:
212
// jquery_修改dom //代码1: // 创建DOM对象: var ps = document.createElement('li'); ps.innerHTML = 'Pascal'; // 添加DOM对象: ul.append(ps); // 添加jQuery对象: ul.append... ...
分类:
Web程序 时间:
2018-05-18 11:39:11
阅读次数:
352
/** * 将图片转换为Base64 */ function image2Base64(img) { var canvas = document.createElement("canvas"); canvas.width = img.width; canvas.height = img.height ...
分类:
Web程序 时间:
2018-05-17 20:41:27
阅读次数:
226
<!--IE8兼容placeholder--><scripttype="text/javascript">if(!(‘placeholder‘indocument.createElement(‘input‘))){$(‘input[placeholder],textarea[placeholder]‘).e
分类:
其他好文 时间:
2018-05-17 13:31:01
阅读次数:
110
var str = "博客园最棒!"; var tempInput = document.createElement('input'); tempInput.value = Url2; document.body.appendChild(tempInput); tempInput.select(); ...
分类:
Web程序 时间:
2018-05-11 17:17:24
阅读次数:
220