下面这个程序错在哪里?

ye_zhy 2001-07-18 10:58:25
我想再网页上实现以下方法:在父窗体中有一个按钮按下后执行clicked函数,但不知道为什么参数传不下去?
<input type=button value="查询" onclick=clicked()>
function clicked()
{
var timestr="fyear="+fyear.options.value+"&fmonth="+fmonth.options.value+"&fday="+day.value;

parent.sj.location="cxjg.asp"+timestr;
return;
}
...全文
127 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
孟子E章 2001-07-18
  • 打赏
  • 举报
回复

function clicked()
{
var timestr="fyear="+document.mxh.fyear.options[document.mxh.fyear.selectedIndex].value+"&fmonth="+document.mxh.fmonth.options[document.mxh.fyear.selectedIndex].value+"&fday="+day.value;

parent.sj.location="cxjg.asp"+timestr;
return;
}
<form name=mxh>
<select name=fyear>
<option>1991
<option>1992
<option>1993
</select>

<select name=fmonth>
<option>1
<option>2
<option>3
</select>
<input type=button value="查询" onclick=clicked()>
</form>

孟子E章 2001-07-18
  • 打赏
  • 举报
回复
timestr="fyear="+fyear.options.value+"&fmonth="+fmonth.options.value+"&fday="+day.value;
有问题:
你用的是下拉框,这样不对!!

28,408

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧