var searchtitle=document.getElementById('search_text_2').value;
Ext.getCmp("mainPanel").add({
title:searchtitle,
id:searchtitle,
closable:true,
bodyStyle: "background:url(img/xuancai2.jpg); border-width: 0px 2px 0px 0px;",
html:'<iframe scrolling="auto" frameborder="0" width="100%" height="100%" src=second.jsp?fortitle='+searchtitle+'></iframe>'
});
mainPanel是个tabPanel,增加个子panel,并在子panel中嵌入iframe,search_text_2是个搜索框,iframe的src属性直接把搜索框的值传给下一个页面。下一个页面通过下面一行代码得到上一个界面搜索框的值。
String sendtitle=request.getParameter("fortitle");