求救:关于框架的src问题:急 window.open("eeee.htm", "mainFrame"); //注意大小写 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 window.top.frames["mainFrame"].location.href="eee.htm" 解决了:代码://构造Script函数 private void BuildScript(DataTable dtTree,ref string strScript) { for( int j = 0; j < dtTree.Rows.Count; j++ ) { if( dtTree.Rows[j]["PageUrl"].ToString() != "" ) { // strScript += "<td><div ID=\"dv" + dtTree.Rows[j]["PointID"] + "\" class=\"tdmenu\" align=\"center\"><A href=\"" + dtTree.Rows[j]["PageUrl"] + "\" target=\"mainFrame\"><font class=\"amenu\"> " + dtTree.Rows[j]["PointName"] + "</font></A></div></td>\n"; strScript += "<td OnClick=\"javascript:window.top.frames['mainFrame'].location.href='"+ dtTree.Rows[j]["PageUrl"] + "';\"><div ID=\"dv" + dtTree.Rows[j]["PointID"] + "\" class=\"tdmenu\" align=\"center\" ><A href=\"left.aspx?ID=" + dtTree.Rows[j]["PointID"] + "\" target=\"leftFrame\"><font class=\"amenu\"> " + dtTree.Rows[j]["PointName"] + "</font></A></div></td>\n"; } else strScript += "<td ><div ID=\"dv" + dtTree.Rows[j]["PointID"] + "\" class=\"tdmenu\" align=\"center\"><A href=\"left.aspx?ID=" + dtTree.Rows[j]["PointID"] + "\" target=\"leftFrame\" ><font class=\"amenu\"> " + dtTree.Rows[j]["PointName"] + "</font></A></div></td>\n"; } } try:window.parent.mainFrame.location.replace("http://www.sun.com");window.parent.mainFrame.location.href="http://www.sun.com"; extjs中new Ext.Window有一个autoLoad页面提交问题,求帮忙 html中的特殊符号如何写到javascript中,求高人解答 用JS代码拼接图片问题 js是多线程的吗,为什么可以同时执行多个语句? fck里面的一段代码!始终不清楚是什么意思啊!好象就是因为这个造成js跨域问题啊 求一个网址后缀提取的正则表达式 javascript怎么打开一个excel, 并且把excel的内容读读出来! iframe中的一个复选框如何表示 如何用javascript向页面添加一个radio控件? 小白请教个变量赋值位置的问题 发布一个基于AJAX的RSS阅读器 框架连接问题
代码:
//构造Script函数
private void BuildScript(DataTable dtTree,ref string strScript)
{
for( int j = 0; j < dtTree.Rows.Count; j++ )
{
if( dtTree.Rows[j]["PageUrl"].ToString() != "" )
{
// strScript += "<td><div ID=\"dv" + dtTree.Rows[j]["PointID"] + "\" class=\"tdmenu\" align=\"center\"><A href=\"" + dtTree.Rows[j]["PageUrl"] + "\" target=\"mainFrame\"><font class=\"amenu\"> " + dtTree.Rows[j]["PointName"] + "</font></A></div></td>\n";
strScript += "<td OnClick=\"javascript:window.top.frames['mainFrame'].location.href='"+ dtTree.Rows[j]["PageUrl"] + "';\"><div ID=\"dv" + dtTree.Rows[j]["PointID"] + "\" class=\"tdmenu\" align=\"center\" ><A href=\"left.aspx?ID=" + dtTree.Rows[j]["PointID"] + "\" target=\"leftFrame\"><font class=\"amenu\"> " + dtTree.Rows[j]["PointName"] + "</font></A></div></td>\n";
}
else strScript += "<td ><div ID=\"dv" + dtTree.Rows[j]["PointID"] + "\" class=\"tdmenu\" align=\"center\"><A href=\"left.aspx?ID=" + dtTree.Rows[j]["PointID"] + "\" target=\"leftFrame\" ><font class=\"amenu\"> " + dtTree.Rows[j]["PointName"] + "</font></A></div></td>\n";
}
}
window.parent.mainFrame.location.replace("http://www.sun.com");
window.parent.mainFrame.location.href="http://www.sun.com";