-->

WEB资讯

您的当前位置:首页 > 资讯 > JS

js为数据加载

2018-08-12 17:37:59  来源:admin 点击:632

/*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伪数据加载*/

相关文章更多 >

© 2024版权所有 水水网

电话:171780793