ie与firefox的问题 这是我的代码 在firefox中可以 但在ie中不可以 请教@! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <script language="javascript">function show(id){var showObj = document.getElementById(id);showObj.style.display="";}function hiddent(id){var hiddentObj = document.getElementById(id);hiddentObj.value="";hiddentObj.style.display="none";}function fill(id,val){var filObj=document.getElementById(id);filObj.value=val;}function sec_time(secObj,start,end){//alert();var Sec_Val = secObj.options[secObj.selectedIndex].value;var centerText = document.getElementById("centertext");var endText = document.getElementById("endtext");if(Sec_Val=="before"){this.show(end);centerText.innerHTML=" ";endText.innerHTML="之前";this.hiddent(start);}else if(Sec_Val=="alert"){this.show(start);endText.innerHTML="之后";centerText.innerHTML=" ";this.hiddent(end);}else if(Sec_Val=="between"){show(start);centerText.innerHTML="至";endText.innerHTML="";show(end);var laws = "[当前日期]-[6个月]";fill(start,laws);}else if(Sec_Val=="last12"){fill(start,"2006-01-01");}else{alert("没有选定值");return ;}}}}function dis(s,e){var startObj = document.getElementById(s);var endObj = document.getElementById(e);alert("Start Date:"+startObj.value+"\nEnd Date:"+endObj.value);}</script><form method="post"><table width="100%"><TR><TD width="12%"><select onchange="sec_time(this,'start','end')"><option value='before'>之前</option><OPTION value="alert">之后</OPTION><OPTION value="between">之间</OPTION><OPTION value="lastsix">近六月</OPTION><option value="last12">近12月</option></select></TD><TD width="18%"><input type='text' id='start'/></td><TD width="5%"><div id="centertext"></div></td><TD width="19%"><input name="text" type='text' id='end' /></td><TD width="38%"><div id="endtext"></div> </td><td width="8%"><input type="button" onClick="dis('start','end')" value ="查看时间"/></td></TR></table></form></body></html>我想得到最好6个月的时间 怎么得到 还有最后12个月的时间 谢谢! 小菜求大虾给段代码!!! 想这样基于数据挖掘的网站有什么技术含量么? 如何生成地图的热点区域? javascript用表格显示时间问题 请教一个javascript中处理Dom的问题 如何增加HTML元素 高手来吧,不难的! 利用网站做一个进销存系统!遇到一点小问题. 再问秋水无恨://这种写法不对,该怎样写???<form name=form1 method=post action='form123.php'>document.all(i).src = 'yes.gif'; JS前台如何调用.NET C#后台有键值的Dictionary 时间问题 关于弹出窗口和屏蔽浏览器地址栏的一些问题
function show(id)
{var showObj = document.getElementById(id);
showObj.style.display="";
}
function hiddent(id)
{
var hiddentObj = document.getElementById(id);
hiddentObj.value="";
hiddentObj.style.display="none";
}function fill(id,val)
{
var filObj=document.getElementById(id);
filObj.value=val;
}function sec_time(secObj,start,end)
{
//alert();var Sec_Val = secObj.options[secObj.selectedIndex].value;
var centerText = document.getElementById("centertext");
var endText = document.getElementById("endtext");
if(Sec_Val=="before")
{this.show(end);
centerText.innerHTML=" ";
endText.innerHTML="之前";
this.hiddent(start);
}
else if(Sec_Val=="alert")
{
this.show(start);
endText.innerHTML="之后";
centerText.innerHTML=" ";
this.hiddent(end);
}
else if(Sec_Val=="between")
{
show(start);
centerText.innerHTML="至";
endText.innerHTML="";
show(end);
var laws = "[当前日期]-[6个月]";
fill(start,laws);
}
else if(Sec_Val=="last12")
{
fill(start,"2006-01-01");
}
else
{
alert("没有选定值");
return ;
}}}
}function dis(s,e)
{
var startObj = document.getElementById(s);
var endObj = document.getElementById(e);
alert("Start Date:"+startObj.value+"\nEnd Date:"+endObj.value);
}</script>
<form method="post">
<table width="100%">
<TR>
<TD width="12%">
<select onchange="sec_time(this,'start','end')">
<option value='before'>之前</option>
<OPTION value="alert">之后</OPTION>
<OPTION value="between">之间</OPTION>
<OPTION value="lastsix">近六月</OPTION>
<option value="last12">近12月</option>
</select></TD>
<TD width="18%">
<input type='text' id='start'/>
</td>
<TD width="5%"><div id="centertext"></div></td>
<TD width="19%"><input name="text" type='text' id='end' /></td>
<TD width="38%"><div id="endtext"></div> </td>
<td width="8%"><input type="button" onClick="dis('start','end')" value ="查看时间"/></td>
</TR>
</table></form>
</body>
</html>
我想得到最好6个月的时间 怎么得到 还有最后12个月的时间
谢谢!