ITeye博客

js

共 2 篇文章

js动态创建form以post方式提交

<script > //js动态创建form 提交表单 function formSubmit(elementValue) { var turnForm = document.createElement("form"); //一定要加入到body中!! document.body.appendChild(turnForm); turnForm.method = 'post'; turnForm.action = '/product/detail.htm'; turnForm.target = '_blank'; //创建隐藏表单 var newElement = document.creat…

2012-01-31 10:46 · js

js比较格式yyyy-mm-dd hh:mm:ss类型的时间的大小

<script> //比较时间 格式 yyyy-mm-dd hh:mi:ss window.onload=function() { var beginTime = '2011-01-01 00:00:00'; var endTime = '2011-01-01 00:00:01'; var beginTimes=beginTime.substring(0,10).split('-'); var endTimes=endTime.substring(0,10).split('-'); beginTime=beginTimes[1]+'-'+beginTimes[2]+'-'+beginTime…

2011-12-17 17:07 · js