在线等,解决就给分:如何提交iframe中的值? document.frames("editor").document.all.inputName.value 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 是这样的,iframe只有这一句:document.write('<iframe ID="editor" NAME="editor" style="width: 500; height:400;display:none"></iframe>');上边没有其他的input,用document.frames("editor").document.all.inputName.value得不到值不过突然发现// 编辑器初始化 function win_init(){ document.all.editor.src = "edit.htm"; window.status = "程序载入中,请等待……"; }调用了edit.htmedit.htm 有调用了 editor.htm<iframe ID="edit1" SRC="editor.htm" NAME="myEditor" onfocus="document.all.editbar._editor = window.frames[this.id];" style="width: 100%; height: 90%;"></iframe>这个是editor页的代码<HTML><HEAD><TITLE>richTextEditor</TITLE></HEAD><STYLE>BODY {margin: 0pt; padding: 0pt; border: none}IFRAME {width: 100%; height: 100%; border: none}</STYLE><SCRIPT src=editor.js language=JScript></SCRIPT><BODY SCROLL=no><IFRAME ID=textEdit></IFRAME></BODY></HTML> 这个是 edit页面的代码<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>ABC代码 编辑器</title><link rel="STYLESHEET" type="text/css" href="htmlediter.css"><script src="chinacecc.js" language="JScript"></script><script language="JavaScript">//===========================================//打开图片列表窗口,并设置接收返回值的目标 //===========================================function openImageList(href) { var newwin=window.open(href,"","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=520,height=400"); newwin.focus(); return;}//打开附件列表窗function openFileList(href) { var newwin=window.open(href,"","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=520,height=400"); newwin.focus(); return;}//============================================//接收返回的图片代码,并插入图片//============================================function receiveVal(val) { UploadComplete(val);}//接收返回的文件链接代码,并插入function receiveFileVal(val) { myEditor.pasteHTML(val);}//--></script></head><body SCROLL="no" STYLE="border: 0pt" bgcolor="white"><fieldset><table border="0" cellspacing="0" cellpadding="0" width="490"> <tr> <td id="fore" class="coolButton" onclick="showfore()" title="更多工具栏" style="display: none; padding: 0" align="right" width="1"></td> <td align="left" width="488"> <table id="editbar" class="coolBar" cellspacing="0" cellpadding="0" style="font-weight: bold; border: 0 solid buttonface;z-index=2;" width="486"> <tr> <td style="width:3px;cursor:move;" width="11"></td> <td class="coolButton" onclick="doFormat('Bold')" title="粗体" width="19"><img src="images/bold.gif" WIDTH="16" HEIGHT="16"></td> <td class="coolButton" onclick="doFormat('Italic')" title="斜体" width="19"><img src="images/italic.gif" WIDTH="16" HEIGHT="16"></td> <td class="coolButton" onclick="doFormat('Underline')" title="下划线" width="19"><img src="images/underline.gif" WIDTH="16" HEIGHT="16"></td> <td style="width: 4;" width="12"><img src="images/separator.gif" WIDTH="2" HEIGHT="18"></td> <td class="coolButton" onclick="doFormat('Undo')" title="撤销" width="19"><img src="images/undo.gif" width="16" height="16"></td> <td class="coolButton" onclick="doFormat('Redo')" title="恢复" width="19"><img src="images/redo.gif" width="16" height="16"></td> <td style="width: 4;" width="12"><img src="images/separator.gif" WIDTH="2" HEIGHT="18"></td> <td class="coolButton" onclick="doFormat('JustifyLeft')" title="左对齐" width="19"><img src="images/jleft.gif" WIDTH="16" HEIGHT="16"></td> <td class="coolButton" onclick="doFormat('JustifyCenter')" title="居中" width="19"><img src="images/jcenter.gif" WIDTH="16" HEIGHT="16"></td> <td class="coolButton" onclick="doFormat('JustifyRight')" title="右对齐" width="19"><img src="images/jright.gif" WIDTH="16" HEIGHT="16"></td> <td style="width: 4;" width="12"><img src="images/separator.gif" WIDTH="2" HEIGHT="18"></td> <td class="coolButton" onclick="doFormat('Cut')" title="剪切" width="19"><img src="images/cut.gif" WIDTH="16" HEIGHT="16"></td> <td class="coolButton" onclick="doFormat('Copy')" title="复制" width="19"><img src="images/copy.gif" WIDTH="16" HEIGHT="16"></td> <td class="coolButton" onclick="doFormat('Paste')" title="粘贴" width="19"><img src="images/paste.gif" WIDTH="16" HEIGHT="16"></td> <td class="coolButton" onclick="doFormat('Delete')" title="删除" width="19"><img src="images/delete.gif" WIDTH="16" HEIGHT="16"></td> <td style="width: 4;" width="12"><img src="images/separator.gif" WIDTH="2" HEIGHT="18"></td> <td class="coolButton" onclick="doFormat('CreateLink')" title="插入链结" width="19"><img src="images/link.gif" WIDTH="16" HEIGHT="16"></td> <td class="coolButton" onclick="openFileList('../../normal/file/filelist.jsp')" title="添加附件"><img src="images/upfiles.gif" WIDTH="16" HEIGHT="16"></td> <td class="coolButton" onclick="AddImg()" title="插入图片" width="19"><img src="images/image.gif" WIDTH="16" HEIGHT="16"></td> <form name=upload target=uploadback method="post"> <input type="hidden" name="CopyrightInfo" value="http://www.chinacecc.com" ID=Hidden1> <td class="coolButton" id=UploadImg style="display: none;width:100;" nowrap width="46"> <input type=button value="选择" onclick="openImageList('../../normal/meta/imagelist.jsp');"> <input type=reset name=reset1 value="取消" style="width:5:height:18" onclick="CancelAddImg()"> </td> </form> <td style="width: 4;" width="12"><img src="images/separator.gif" WIDTH="2" HEIGHT="18"></td> <td class="coolButton" onclick="doFormat('BackColor',bkcolorimg.style.backgroundColor)" title="突出显示颜色" width="19"> <img src="images/colorpen.gif" width="16" height="16" style="background-color:#FFFFFF" id=bkcolorimg></td> <td class="coolButton" onclick="palette(bkcolorimg)" title="选择突出显示颜色" style="font: 5pt;width:3pt;" width="15">▼</td> <td class="coolButton" onclick="doFormat('ForeColor',colorimg.style.backgroundColor)" title="字体颜色" width="19"><img src="images/fontcolor.gif" width="16" height="16" style="background-color:#000000" id=colorimg></td> <td class="coolButton" onclick="palette(colorimg)" title="选择字体颜色" style="font: 5pt;width:3pt;" width="15">▼</td> <td style="width: 4;" width="10"><img src="images/separator.gif" WIDTH="2" HEIGHT="18"></td> <td class="coolButton" onclick="return false;showHelp()" title="帮助" width="23" align="center"><img src="images/help.gif" width="16" height="16"></td></tr></table><iframe height=0 width=0 style="visibility: hidden" id=uploadback name=uploadback></iframe> <table id="editbar1" class="coolBar" cellspacing="0" cellpadding="0" style="font-weight: bold; border: 0 solid buttonface;z-index=3;display:block;" width="487"> <tr> <td style="width: 3;" width="4"> </td> <td class="coolButton" onclick="doFormat('Outdent')" title="减小缩进" width="17"><img src="images/outdent.gif" WIDTH="16" HEIGHT="16"></td> <td class="coolButton" onclick="doFormat('Indent')" title="增加缩进" width="17"><img src="images/indent.gif" WIDTH="16" HEIGHT="16"></td> <td class="coolButton" onclick="doFormat('InsertHorizontalRule')" title="插入水平线" width="17"><img src="images/hr.gif" WIDTH="16" HEIGHT="16"></td> <td style="width: 4;" width="5"><img src="images/separator.gif" WIDTH="2" HEIGHT="18"></td> <td class="coolButton" onclick="doFormat('FormatBlock','<OL>')" title="编号" width="17"><img src="images/ol.gif" WIDTH="16" HEIGHT="16"></td> <td class="coolButton" onclick="doFormat('FormatBlock','<UL>')" title="项目符号" width="17"><img src="images/ul.gif" WIDTH="16" HEIGHT="16"></td> <td style="width: 4;" width="5"><img src="images/separator.gif" WIDTH="2" HEIGHT="18"></td> <td class="coolButton" onclick="addTable()" title="插入表格" width="17"><img src="images/table.gif" WIDTH="16" HEIGHT="16"></td> <td style="width: 4;" width="5"><img src="images/separator.gif" WIDTH="2" HEIGHT="18"></td> <td class="coolButton" onclick="doFormat('RemoveFormat')" title="去除格式" width="17"><img src="images/unformat.gif" WIDTH="16" HEIGHT="16"></td> <td style="width: 4;" width="5"><img src="images/separator.gif" WIDTH="2" HEIGHT="18"></td> <td id="formatSelect" style="padding: 0;" title="段落格式" width="88"> <select onchange="doSelectClick('FormatBlock',this);this.returnValue=false;" style="font: icon; width: 80px;" id="select1" name="select1"> <option>段落格式</option> <option VALUE="<P>">普通 <option VALUE="<PRE>">已编排格式 <option VALUE="<H1>">标题一 <option VALUE="<H2>">标题二 <option VALUE="<H3>">标题三 <option VALUE="<H4>">标题四 <option VALUE="<H5>">标题五 <option VALUE="<H6>">标题六 <option VALUE="<H7>">标题七 </select> </td> <td id="fontSelect" style="padding: 0;" title="字体" width="58"> <select onchange="doSelectClick('FontName',this);" style="font: icon; width: 50px;"> <option>字体</option> <option VALUE="宋体">宋体 <option VALUE="楷体_GB2312">楷体 <option VALUE="隶书">隶书 <option VALUE="黑体">黑体 <option VALUE="仿宋_GB2312">仿宋 </select> </td> <td id="sizeSelect" style="padding: 0;" title="字体大小" width="83"> <select onchange="doSelectClick('FontSize',this);" style="font: icon; width: 75px;"> <option>字体大小</option> <option VALUE="1">1 <option VALUE="2">2 <option VALUE="3">3 <option VALUE="4">4 <option VALUE="5">5 <option VALUE="6">6 <option VALUE="7">7 </select> </td> <td style="padding: 0;" title="特殊字体格式" width="108"> <select id="specialtype" onchange="doSelectClick('FormatBlock',this);this.returnValue=false;" style="font: icon; width: 100px;"> <option>特殊字体格式</option> <option VALUE="SUP">上标 <option VALUE="SUB">下标 <option VALUE="DEL">删除线 <option VALUE="BLINK">闪烁 <option VALUE="BIG">增大字体 <option VALUE="SMALL">减小字体 </select> </td> <td style="width: 4;" width="10"><img src="images/separator.gif" WIDTH="2" HEIGHT="18"></td> </tr> </table></td> <td align="right" width="10"> </td> <td align="right" class="coolButton" onclick="showmore()" title="更多工具栏" style="padding: 0" id="more" width="1"></td> </tr></table></fieldset><iframe ID="edit1" SRC="editor.htm" NAME="myEditor" onfocus="document.all.editbar._editor = window.frames[this.id];" style="width: 100%; height: 90%;"></iframe> <input type="hidden" name="content"> <input type="hidden" name=body ID=Hidden1><iframe id="uploadback" name="uploadback" style="display:none"></iframe><script language="javascript">if((window.navigator.userAgent.indexOf("IE 5") < 1) && (window.navigator.userAgent.indexOf("IE 6") < 1)) { alert("请使用Microsoft Internet Explorer 5.0\n或更高版本的浏览器!"); window.close();}window.onload = init;window.onresize = fixSize;document.all.editbar._editor = window.frames[document.all.edit1.id];document.all.editbar1._editor = window.frames[document.all.edit1.id];</script></body></html> Jquery动态修改li中的数据??? 请问:如何放大缩小图片的一部分? 关于qq空间自定义的js iframe页面获取ID jsp单元格的问题 js日期控件(时分秒)不受frame限制 求助,过滤字符串,谢谢· 无效的过程调用或参数???????? 人力资源管理系统... <A href="" onclick="window.back();">back</A>错误 怎么判断getElementById("a001")元素存在不存在?急用,在线等!!! 检测IP地址的正确性函数。大家找找还有什么漏了没?
// 编辑器初始化
function win_init(){
document.all.editor.src = "edit.htm";
window.status = "程序载入中,请等待……";
}调用了edit.htmedit.htm 有调用了 editor.htm<iframe ID="edit1" SRC="editor.htm" NAME="myEditor" onfocus="document.all.editbar._editor = window.frames[this.id];" style="width: 100%; height: 90%;"></iframe>这个是editor页的代码
<HTML>
<HEAD>
<TITLE>richTextEditor</TITLE>
</HEAD><STYLE>
BODY {margin: 0pt; padding: 0pt; border: none}
IFRAME {width: 100%; height: 100%; border: none}
</STYLE><SCRIPT src=editor.js language=JScript></SCRIPT><BODY SCROLL=no>
<IFRAME ID=textEdit></IFRAME>
</BODY>
</HTML>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>ABC代码 编辑器</title>
<link rel="STYLESHEET" type="text/css" href="htmlediter.css">
<script src="chinacecc.js" language="JScript"></script>
<script language="JavaScript">
//===========================================
//打开图片列表窗口,并设置接收返回值的目标
//===========================================
function openImageList(href) {
var newwin=window.open(href,"","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=520,height=400");
newwin.focus();
return;
}
//打开附件列表窗
function openFileList(href) {
var newwin=window.open(href,"","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=520,height=400");
newwin.focus();
return;
}
//============================================
//接收返回的图片代码,并插入图片
//============================================
function receiveVal(val) {
UploadComplete(val);
}
//接收返回的文件链接代码,并插入
function receiveFileVal(val) {
myEditor.pasteHTML(val);
}
//--></script>
</head>
<body SCROLL="no" STYLE="border: 0pt" bgcolor="white">
<fieldset>
<table border="0" cellspacing="0" cellpadding="0" width="490">
<tr>
<td id="fore" class="coolButton" onclick="showfore()" title="更多工具栏" style="display: none; padding: 0" align="right" width="1"></td>
<td align="left" width="488">
<table id="editbar" class="coolBar" cellspacing="0" cellpadding="0" style="font-weight: bold; border: 0 solid buttonface;z-index=2;" width="486">
<tr>
<td style="width:3px;cursor:move;" width="11"></td>
<td class="coolButton" onclick="doFormat('Bold')" title="粗体" width="19"><img src="images/bold.gif" WIDTH="16" HEIGHT="16"></td>
<td class="coolButton" onclick="doFormat('Italic')" title="斜体" width="19"><img src="images/italic.gif" WIDTH="16" HEIGHT="16"></td>
<td class="coolButton" onclick="doFormat('Underline')" title="下划线" width="19"><img src="images/underline.gif" WIDTH="16" HEIGHT="16"></td>
<td style="width: 4;" width="12"><img src="images/separator.gif" WIDTH="2" HEIGHT="18"></td>
<td class="coolButton" onclick="doFormat('Undo')" title="撤销" width="19"><img src="images/undo.gif" width="16" height="16"></td>
<td class="coolButton" onclick="doFormat('Redo')" title="恢复" width="19"><img src="images/redo.gif" width="16" height="16"></td>
<td style="width: 4;" width="12"><img src="images/separator.gif" WIDTH="2" HEIGHT="18"></td>
<td class="coolButton" onclick="doFormat('JustifyLeft')" title="左对齐" width="19"><img src="images/jleft.gif" WIDTH="16" HEIGHT="16"></td>
<td class="coolButton" onclick="doFormat('JustifyCenter')" title="居中" width="19"><img src="images/jcenter.gif" WIDTH="16" HEIGHT="16"></td>
<td class="coolButton" onclick="doFormat('JustifyRight')" title="右对齐" width="19"><img src="images/jright.gif" WIDTH="16" HEIGHT="16"></td>
<td style="width: 4;" width="12"><img src="images/separator.gif" WIDTH="2" HEIGHT="18"></td>
<td class="coolButton" onclick="doFormat('Cut')" title="剪切" width="19"><img src="images/cut.gif" WIDTH="16" HEIGHT="16"></td>
<td class="coolButton" onclick="doFormat('Copy')" title="复制" width="19"><img src="images/copy.gif" WIDTH="16" HEIGHT="16"></td>
<td class="coolButton" onclick="doFormat('Paste')" title="粘贴" width="19"><img src="images/paste.gif" WIDTH="16" HEIGHT="16"></td>
<td class="coolButton" onclick="doFormat('Delete')" title="删除" width="19"><img src="images/delete.gif" WIDTH="16" HEIGHT="16"></td> <td style="width: 4;" width="12"><img src="images/separator.gif" WIDTH="2" HEIGHT="18"></td>
<td class="coolButton" onclick="doFormat('CreateLink')" title="插入链结" width="19"><img src="images/link.gif" WIDTH="16" HEIGHT="16"></td>
<td class="coolButton" onclick="openFileList('../../normal/file/filelist.jsp')" title="添加附件"><img src="images/upfiles.gif" WIDTH="16" HEIGHT="16"></td>
<td class="coolButton" onclick="AddImg()" title="插入图片" width="19"><img src="images/image.gif" WIDTH="16" HEIGHT="16"></td>
<form name=upload target=uploadback method="post">
<input type="hidden" name="CopyrightInfo" value="http://www.chinacecc.com" ID=Hidden1>
<td class="coolButton" id=UploadImg style="display: none;width:100;" nowrap width="46">
<input type=button value="选择" onclick="openImageList('../../normal/meta/imagelist.jsp');">
<input type=reset name=reset1 value="取消" style="width:5:height:18" onclick="CancelAddImg()">
</td>
</form>
<td class="coolButton" onclick="doFormat('BackColor',bkcolorimg.style.backgroundColor)" title="突出显示颜色" width="19">
<img src="images/colorpen.gif" width="16" height="16" style="background-color:#FFFFFF" id=bkcolorimg></td>
<td class="coolButton" onclick="palette(bkcolorimg)" title="选择突出显示颜色" style="font: 5pt;width:3pt;" width="15">▼</td>
<td class="coolButton" onclick="doFormat('ForeColor',colorimg.style.backgroundColor)" title="字体颜色" width="19"><img src="images/fontcolor.gif" width="16" height="16" style="background-color:#000000" id=colorimg></td>
<td class="coolButton" onclick="palette(colorimg)" title="选择字体颜色" style="font: 5pt;width:3pt;" width="15">▼</td> <td style="width: 4;" width="10"><img src="images/separator.gif" WIDTH="2" HEIGHT="18"></td>
<td class="coolButton" onclick="return false;showHelp()" title="帮助" width="23" align="center"><img src="images/help.gif" width="16" height="16"></td>
</tr>
</table>
<iframe height=0 width=0 style="visibility: hidden" id=uploadback name=uploadback></iframe>
<table id="editbar1" class="coolBar" cellspacing="0" cellpadding="0" style="font-weight: bold; border: 0 solid buttonface;z-index=3;display:block;" width="487">
<tr>
<td style="width: 3;" width="4"> </td>
<td class="coolButton" onclick="doFormat('Outdent')" title="减小缩进" width="17"><img src="images/outdent.gif" WIDTH="16" HEIGHT="16"></td>
<td class="coolButton" onclick="doFormat('Indent')" title="增加缩进" width="17"><img src="images/indent.gif" WIDTH="16" HEIGHT="16"></td>
<td class="coolButton" onclick="doFormat('InsertHorizontalRule')" title="插入水平线" width="17"><img src="images/hr.gif" WIDTH="16" HEIGHT="16"></td>
<td style="width: 4;" width="5"><img src="images/separator.gif" WIDTH="2" HEIGHT="18"></td>
<td class="coolButton" onclick="doFormat('FormatBlock','<OL>')" title="编号" width="17"><img src="images/ol.gif" WIDTH="16" HEIGHT="16"></td>
<td class="coolButton" onclick="doFormat('FormatBlock','<UL>')" title="项目符号" width="17"><img src="images/ul.gif" WIDTH="16" HEIGHT="16"></td>
<td style="width: 4;" width="5"><img src="images/separator.gif" WIDTH="2" HEIGHT="18"></td>
<td class="coolButton" onclick="addTable()" title="插入表格" width="17"><img src="images/table.gif" WIDTH="16" HEIGHT="16"></td>
<td style="width: 4;" width="5"><img src="images/separator.gif" WIDTH="2" HEIGHT="18"></td>
<td class="coolButton" onclick="doFormat('RemoveFormat')" title="去除格式" width="17"><img src="images/unformat.gif" WIDTH="16" HEIGHT="16"></td>
<td style="width: 4;" width="5"><img src="images/separator.gif" WIDTH="2" HEIGHT="18"></td>
<td id="formatSelect" style="padding: 0;" title="段落格式" width="88">
<select onchange="doSelectClick('FormatBlock',this);this.returnValue=false;" style="font: icon; width: 80px;" id="select1" name="select1">
<option>段落格式</option>
<option VALUE="<P>">普通
<option VALUE="<PRE>">已编排格式
<option VALUE="<H1>">标题一
<option VALUE="<H2>">标题二
<option VALUE="<H3>">标题三
<option VALUE="<H4>">标题四
<option VALUE="<H5>">标题五
<option VALUE="<H6>">标题六
<option VALUE="<H7>">标题七
</select>
</td>
<td id="fontSelect" style="padding: 0;" title="字体" width="58">
<select onchange="doSelectClick('FontName',this);" style="font: icon; width: 50px;">
<option>字体</option>
<option VALUE="宋体">宋体
<option VALUE="楷体_GB2312">楷体
<option VALUE="隶书">隶书
<option VALUE="黑体">黑体
<option VALUE="仿宋_GB2312">仿宋
</select>
</td>
<td id="sizeSelect" style="padding: 0;" title="字体大小" width="83">
<select onchange="doSelectClick('FontSize',this);" style="font: icon; width: 75px;">
<option>字体大小</option>
<option VALUE="1">1
<option VALUE="2">2
<option VALUE="3">3
<option VALUE="4">4
<option VALUE="5">5
<option VALUE="6">6
<option VALUE="7">7
</select>
</td>
<td style="padding: 0;" title="特殊字体格式" width="108">
<select id="specialtype" onchange="doSelectClick('FormatBlock',this);this.returnValue=false;" style="font: icon; width: 100px;">
<option>特殊字体格式</option>
<option VALUE="SUP">上标
<option VALUE="SUB">下标
<option VALUE="DEL">删除线
<option VALUE="BLINK">闪烁
<option VALUE="BIG">增大字体
<option VALUE="SMALL">减小字体
</select>
</td>
<td style="width: 4;" width="10"><img src="images/separator.gif" WIDTH="2" HEIGHT="18"></td>
</tr>
</table>
</td>
<td align="right" width="10"> </td>
<td align="right" class="coolButton" onclick="showmore()" title="更多工具栏" style="padding: 0" id="more" width="1"></td>
</tr></table>
</fieldset>
<iframe ID="edit1" SRC="editor.htm" NAME="myEditor" onfocus="document.all.editbar._editor = window.frames[this.id];" style="width: 100%; height: 90%;"></iframe>
<input type="hidden" name="content">
<input type="hidden" name=body ID=Hidden1>
<iframe id="uploadback" name="uploadback" style="display:none"></iframe>
<script language="javascript">
if((window.navigator.userAgent.indexOf("IE 5") < 1) && (window.navigator.userAgent.indexOf("IE 6") < 1)) {
alert("请使用Microsoft Internet Explorer 5.0\n或更高版本的浏览器!");
window.close();
}
window.onload = init;
window.onresize = fixSize;
document.all.editbar._editor = window.frames[document.all.edit1.id];
document.all.editbar1._editor = window.frames[document.all.edit1.id];
</script>
</body>
</html>