当前位置: 代码迷 >> Java Web开发 >> 关于BUTTON加框架链接的有关问题
  详细解决方案

关于BUTTON加框架链接的有关问题

热度:56   发布时间:2016-04-17 16:47:55.0
关于BUTTON加框架链接的问题
<a   href= "test.jsp "   target= "leftFrame "> 链接   </a>
普通的是这样
但用在按钮上不知怎么写
<input   type= "button "   name= "button "   value= "button "   onclick= "javascript:document.location.href= 'xxx.jsp ' ">
怎么让 'xxx.jsp '页在框架左边显示呢?

------解决方案--------------------
<form target= "leftFrame " method= "post " action= "xxx.jsp ">
<input type=submit>
</form>
------解决方案--------------------
<script language= "JavaScript ">
function fff(){
document.form.action= "xxx.jsp ";
document.form.target= "leftFrame ";
document.form.submit();
}
</script>
<input type= "button " name= "button " value= "button " onclick= "fff() "/>

末尾别少 "/ "
  相关解决方案