js为数据加载
所属分类: JS 2018-08-12 17:37:59 编辑:admin 浏览次数 1046 次
/*js伪数据加载*/ //插入时间 function CurentTime() { var now = new Date(); var year = now.getFullYear(); //年 var month = now.getMonth() + 1; //月 var day = now.getDate(); //日 var hh = now.getHours(); //时 var mm = now.getMinutes(); //分 var clock = year + "-"; if(month < 10) clock += "0"; clock += month + "-"; if(day < 10) clock += "0"; clock += day + " "; if(hh < 10) clock += "0"; clock += hh + ":"; if (mm < 10) clock += '0'; clock += mm; return(clock); } var myDate = CurentTime();//获取系统当前时间 var zfx_time = document.getElementById("zfx_time"); var zfx_time_node = document.createElement("i"); zfx_time_node.innerHTML = myDate; zfx_time.appendChild(zfx_time_node); //插入反馈 var zfxcontent = document.getElementById("opinion_info").value; var zfx_charu = document.getElementById("zfx_charu"); var newNodeCenter = document.createElement("i"); newNodeCenter.innerHTML = zfxcontent; zfx_charu.appendChild(newNodeCenter); /*js伪数据加载*/
猜你喜欢
- JavaScript和Jquery的dom操作对比 2018-07-11
- js实现跳转和刷新功能 2018-07-16
- 前端实现分页 2018-07-21
- Js获取当前日期时间及其它操作 2018-08-12
- 正则表达式常用的验证 2018-08-13
- 网页屏蔽f12,屏蔽右键,屏蔽选中,屏蔽复制粘贴 2019-03-19