我有一个代码
<script type="text/javascript" src="http://js.nicedit.com/nicEdit-latest.js"></script> <script type="text/javascript">
//<![CDATA[
bkLib.onDomLoaded(function() {
new nicEditor({fullPanel : true},{buttonList : ['fontSize','bold','italic','underline','strikeThrough','subscript','superscript','html','image']}).panelInstance('area2');
});
//]]>
function popup_specialChars()
{
var ht;
if(window.navigator.appVersion.indexOf("MSIE 5.01") == -1)
ht = 330;
else
ht = 720;
specialCharsWindow = window.open
(
"specialChars.php", "special_characters",
"resizable=yes,scrollbars=yes,height=" + ht + ",width=650,dependent=yes,alwaysRaised=yes"
);
specialCharsWindow.focus();
}
</script>
<a href="javascript:popup_specialChars();" class="special">Insert Special Character</a>
<textarea id="area1" name="txttitle" style="height: 150;width: 600"></textarea>
specialChars.php
这里我有一个javascript函数
function insert_text(str)
{
alert(str);
window.opener.document.getElementById('area1').value += str;
this.window.focus();
}
现在的问题是,我在警告中获得了角色,但它没有附加到父窗口的textarea。为什么会这样?