在JS中怎么比较两个变量的大小? form的名字别用form关键字,改成form1什么的,最好有实际意义的form 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <script> function f1() { var v1=document.all.year_from.options[document.all.year_from.selectedIndex].text var v2=document.all.year_to.options[document.all.year_to.selectedIndex].text if(v1>v2) { alert("big"); } }</script><select id="year_from"><option>2002</option><option>2003</option><option>2004</option><option>2005</option></select><select id="year_to"><option>2003</option><option>2004</option></select><input type="button" onclick=f1()> jQuery加载问题 链接弹出窗口 js设置不了图片热区 web窗口关闭时,要求 输入密码, 密码正 确则关闭 否则不关闭,怎么实现 如何将下面程序中的字符串用一个变量来代替,求大神指点! 来看这个为什么出错!!! 急!急! 50分请教各位JS高手:如何用JS打开一个带有“是、否”选择的对话框? 关于select的提示问题 如何屏蔽掉IE的快捷键?如CTRL+P ,CTRL+N等 求个大神!解答一下我的问题。弄的烦死了。。 请教:如何更改td的class? 请clare2003(忘情火)进来接分吧:)
function f1()
{
var v1=document.all.year_from.options[document.all.year_from.selectedIndex].text
var v2=document.all.year_to.options[document.all.year_to.selectedIndex].text
if(v1>v2)
{
alert("big");
} }
</script>
<select id="year_from">
<option>
2002</option>
<option>
2003</option>
<option>
2004</option>
<option>
2005</option></select><select id="year_to">
<option>
2003</option>
<option>
2004</option></select><input type="button" onclick=f1()>