js 向form表单中插入数据

时间:2015-01-03 19:45:21   收藏:0   阅读:487

var newElement = document.createElement("input");

 var nowtime=year+""+month+day+hour+minute+second;

newElement.setAttribute("name","nowtime");
newElement.setAttribute("value",nowtime);
newElement.style.visibility="hidden";//设置为隐藏
signinform.appendChild(newElement);

原文:http://www.cnblogs.com/earendil/p/4199854.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!