1.编辑模板,template(id, data) 根据 id 渲染模板。内部会根据document.getElementById(id)查找模板。 如果没有 data 参数,那么将返回一渲染函数。有data那么就返回Html。 2.语法 表达式 {{ 与 }} 符号包裹起来的语句则为模板的逻辑表达 ...
分类:
其他好文 时间:
2018-03-12 16:54:56
阅读次数:
1109
HTML代码:<divid="lee"><p>1</p><p>2</p><p>3</p><p>4</p><p>5</p></div>JAVASCRIPT代码:<script>varx=document.getElementById(‘lee‘)
分类:
编程语言 时间:
2018-03-11 11:52:31
阅读次数:
152
firefox等可以使用: document.getElementById("id").setAttribute("style","top:20px;left:20px;color:red;"); IE中则必须使用style.cssText document.getElementById("id") ...
分类:
其他好文 时间:
2018-03-10 18:13:43
阅读次数:
153
fiileList对象: file对象的集合 document.getElementById("fileDemo").files取到的就是fileList对象 Blob对象: 原始数据对象,有两个属性 size和type file对象 继承于Blob对象,指向具体的文件除了继承到的size和type ...
function audioAutoPlay(id) {var audio = document.getElementById(id),play = function () {audio.play();document.removeEventListener("touchstart", play, ...
分类:
移动开发 时间:
2018-03-07 15:17:31
阅读次数:
194
function addtreetotable(obj){ var table1 = document.getElementById("Table1"); var hang = obj.parentNode.parentNode.parentNode.childElementCount; for(v ...
1 // 2 function loadXMLDoc() { 3 function success(text) { 4 var textarea = document.getElementById('myid'); 5 textarea.value = text; 6 } 7 function fa... ...
分类:
Web程序 时间:
2018-03-07 10:31:05
阅读次数:
237
JavaScript 中,函数及变量的声明都将被提升到函数的最顶部。 JavaScript 中,变量可以在使用后声明,也就是变量可以先使用再声明。 x = 5; // 变量 x 设置为 5elem = document.getElementById("demo"); // 查找元素 elem.inn ...
分类:
Web程序 时间:
2018-03-04 21:14:19
阅读次数:
167
varvideo=document.getElementById("play_video");$(".playButton").click(function(){if(video.paused){video.play();$(this).hide();}else{video.pause();$(this).attr(‘src‘,‘{{
分类:
其他好文 时间:
2018-03-04 14:30:56
阅读次数:
142
前提:本人使用的是IE9浏览器 1.IE中无法显示,谷歌却显示正常的问题: 1)情况一 var myChart_cols<%=i%> = echarts.init(document.getElementById('cols_qk_<%=i%>'),'shine'); // 使用刚指定的配置项和数据显 ...
分类:
其他好文 时间:
2018-03-02 14:52:52
阅读次数:
160