在页面A上点击按钮调用页面B上按钮的步骤

在页面A上点击按钮调用页面B上按钮的方法
能不能实现  在页面A上点击一个按钮调用页面B上按钮的实现方法  这种效果


求大神解答。。



------解决思路----------------------
没描述清除页面A和页面B的关系
页面A和B是在同一个页面中的不同frame中的话可以查下js跨frame调用
如果是跳转的话点击页面A的按钮可以做个标记,作为参数传到后台,进入页面B的时候判断是否点击了页面A的按钮,然后决定调用页面B按钮的方法
只是猜测你的需求,你可以参考下
------解决思路----------------------
第一个页面
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="js/jquery-1.11.1.js"></script>
<script type="text/javascript">
var nWindow;

function openWindow(){
nWindow = window.open("child.jsp","_blank ");
}


function newWindowClick(){
var input = $(nWindow.document.forms[0]).find("input")[0].click();;
console.log($(nWindow.document.forms[0]).find("input")[0]);
}
</script>
</head>
<body>
<input type="button" value="打开一个新窗口" onclick="openWindow();"/>
<input type="button" value="测试新窗口中的事件" onclick="newWindowClick();"/>
</body>
</html>

第二个页面

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="js/jquery-1.11.1.js"></script>
<script type="text/javascript">

</script>
</head>
<body>
<form action="">
<input type="button" value="新窗口中的事件" onclick="alert(111)"/>
</form>


</body>
</html>


第一个页面的按钮触发第二个页面按钮的点击事件