日期:2014-05-16  浏览次数:20471 次

frame 如何把左边的选择的数据提交到右边的页面上?
frame左面的jsp中有form,提交时想把参数传递到右面的jsp中,在右面的jsp中获取到左面jsp传递的参数,请问左面的jsp中的提交脚本如何写呢?
<input name="Submit" type="button" value="提交" onclick = submit();>
function submit(){
}

目的是把参数传到右面的jsp中去,右面的form名称为 right 如果这么写parent.custright.location.reload()则只是刷新右面的页面而获取不到左面传递的参数,想在右面的jsp中获取左面传递的参数,请问submit()这个函数里面该如何写呢?谢谢!

------解决方案--------------------
form 元素有个action属性
这样试试:<FORM ACTION="http://example.microsoft.com/sample.html" METHOD="POST">

------解决方案--------------------
<FORM target="右边框架的name属性值" action="提交到的页面"
------解决方案--------------------
怎么可能弹出新窗口,你target没设置对吧??

index.htm
HTML code
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>test</title>
</head>
  <frameset rows="*" cols="195,*" border="0" framespacing="0" frameborder="NO">
    <frame src="left.htm" name="leftFrame" scrolling="auto">
    <frame src="right.htm" name="rightFrame">
  </frameset>

------解决方案--------------------
设置target就可以了啊!