zfxcms ^回到顶部

您的当前位置:首页 > web资讯 > JS > js为数据加载

js为数据加载

所属分类: JS   2018-08-12 17:37:59  编辑:admin  浏览次数 631 次

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

Web文章检索

Web文章目录