我有一个链接,当它点击时,它会打开另一个浏览器窗口(specialChars.php)
function popup_specialChars()
{
var ht;
if(window.navigator.appVersion.indexOf("MSIE 5.01") == -1)
ht = 300;
else
ht = 720;
specialCharsWindow = window.open
(
"/TradeScienceJournalSystem/specialChars.php", "special_characters",
"resizable=yes,scrollbars=yes,height=" + ht + ",width=650,dependent=yes,alwaysRaised=yes"
);
specialCharsWindow.focus();
}
<a href="javascript:popup_specialChars();" class="special">Insert Special Character</a>
<textarea name="docArticleTitle" cols="60" rows="14"></textarea>
特殊字符.php
function insert_text(str)
{
alert(str);
opener.append(str); // Not working
this.window.focus();
}
<table border="1" id="table1" width="97%">
<tr>
<td align="center" class="specialcharlink"><a href="javascript:insert_text('á')"><span class="specialchar">á</span></a></td>
</tr>
</table>
现在,当单击特殊字符的链接时会发生什么情况,insert_text() 将被调用。警报显示特殊字符。但我想将该字符附加到打开器窗口的文本区域中。但它不起作用。
如何表示打开器窗口的文本区域?