求救:关于框架的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"; 請教 Javascript 中 string test 的問題 JavaScript或者jquery怎麼删除文件夹下的指定文件 请问如何去处当前打开页的状态栏,地址栏并使页面全屏显示? 框架中如何使用日期控件 请教一个iframe中的src的问题。谢谢 奇怪的onhashchange事件,求助 #表格循环检索 解释一下函数意思! 如何去调IE中的地址栏 火狐不能调试这样的代码吗 发布一个基于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";