一:
function opennew(strValue)
{
var new_window = window.open("new.jsp?strValue="+strValue);
}
然后在new.jsp中:
<input type=hidden value=<%request.getParameter("strValue")%>>
二:
利用showModalDialog[可以查阅MSDN的IEREF.chm和IEREF.chi看例子]
function AddNode()
{
var strPathName=window.location.pathname;
var inParameter="NULL"+","+"NULL"+","+GetSelectValue(document.forms[0].ModelID);
var outResult=showModalDialog(strPathName.substring(0,(strPathName.lastIndexOf('/')+1))+"Define_Node.jsp?Node=NULL&Action=NULL&ModelID="+GetSelectValue(document.forms[0].ModelID),inParameter,"dialogWidth:12;dialogHeight:6;dialogTop:400;dialogLeft:500;status:no;");
if(outResult=="False")
{
}
else
{
var outParameter=outResult.split(",");
var strOutNode=outParameter[0];
var strOutAction=outParameter[1];
var strOutNode_,strOutAction_;
strOutNode_=strOutNode.split("_");
strOutAction_=strOutAction.split("_");
document.forms[0].ListNode.length=document.forms[0].ListNode.length+1;
document.forms[0].ListAction.length=document.forms[0].ListAction.length+1;
var iLen=document.forms[0].ListNode.length;
document.forms[0].ListNode.options[iLen-1].value=strOutNode_[0];
document.forms[0].ListNode.options[iLen-1].text=strOutNode_[1];
document.forms[0].ListAction.options[iLen-1].value=strOutAction_[0];
document.forms[0].ListAction.options[iLen-1].text=strOutAction_[1];
}
}
function opennew(strValue)
{
var new_window = window.open("new.jsp?strValue="+strValue);
}
然后在new.jsp中:
<input type=hidden value=<%request.getParameter("strValue")%>>
二:
利用showModalDialog[可以查阅MSDN的IEREF.chm和IEREF.chi看例子]
function AddNode()
{
var strPathName=window.location.pathname;
var inParameter="NULL"+","+"NULL"+","+GetSelectValue(document.forms[0].ModelID);
var outResult=showModalDialog(strPathName.substring(0,(strPathName.lastIndexOf('/')+1))+"Define_Node.jsp?Node=NULL&Action=NULL&ModelID="+GetSelectValue(document.forms[0].ModelID),inParameter,"dialogWidth:12;dialogHeight:6;dialogTop:400;dialogLeft:500;status:no;");
if(outResult=="False")
{
}
else
{
var outParameter=outResult.split(",");
var strOutNode=outParameter[0];
var strOutAction=outParameter[1];
var strOutNode_,strOutAction_;
strOutNode_=strOutNode.split("_");
strOutAction_=strOutAction.split("_");
document.forms[0].ListNode.length=document.forms[0].ListNode.length+1;
document.forms[0].ListAction.length=document.forms[0].ListAction.length+1;
var iLen=document.forms[0].ListNode.length;
document.forms[0].ListNode.options[iLen-1].value=strOutNode_[0];
document.forms[0].ListNode.options[iLen-1].text=strOutNode_[1];
document.forms[0].ListAction.options[iLen-1].value=strOutAction_[0];
document.forms[0].ListAction.options[iLen-1].text=strOutAction_[1];
}
}
解决方案 »
- firefox 获取 获取到event 但是 获取不到 event里边的属性
- s:textfield 标签里面怎么能让他只能输入数字
- 高手注释一下这段JS代码
- 如何区分字符串变量为空,和undefined
- 怎么在回复框中添加表情图标
- 在myeclipse运行程序出现500错误如下,怎么解决?项目为网上书店
- 怎么判断JSON数组总是否包含某条JSON数据?
- ???????怎样取得页面的源代码,页面在运行中有改变,我要取得改变后的代码??????????
- 关于文件控件的问题,请各位大佬帮忙看看
- 这是为什么
- 关于INPUT的动态效果,恳请获得帮助。
- 报表 BeReports控件,欢迎批评指正,踊跃跟贴!
{
var location = "<%=request.getParameter("location")%>";//这里的location就是我选中的行标志
var tab = window.opener.document.getElementById('tab');//这个就是我要的对象
alert(tab.rows[location].cells[1].childNodes[0].value);//从table里面取出元素的值
}马上结贴,虽然老兄的方法我用不上,不过表示感谢,送你50分,另外50分给我自己作为嘉奖啦:)
form2是new.asp的form的name,form1是odd.asp的form的name
<script language="javascript">
<!--
function check(){
document.form2.bb.value=parent.document.form1.add.value;
}
-->