当您单击打印笔记时,我希望另一个窗口会弹出您所做的笔记。就我而言,它一直显示为空白。
如果我应该提供更多详细信息,请告诉我:
带有文本区域的页面 (1)
<textarea id="sermon_notes" cols="5" rows="5"></textarea>
<a href="../notes/print/forgiveness/index.html" target="_blank" class="btn_small_cmg"> <span>Print Notes</span></a>
页面 (2) 与 javascript 试图提取您在页面 (1) 上编写的信息,以便它可以显示在页面 (2) 上
<html>
<head>
<title>Media | New Foundation Christian Ministries </title>
<link rel="stylesheet" href="../css/popout.css" media="screen" type="text/css" />
<link rel="stylesheet" href="../css/print.css" media="print" type="text/css" />
</head>
<body class="about">
<div class="wrap">
<div class="header">
<a href="javaScript:window.print();" class="print"><span>Print</span></a>
<h1><img src="../images/logo.png" alt="New Foundation Christian Ministries" /> </h1>
</div>
<div class="content">
<div class="page_header">
<h2>Notes</h2>
</div>
<h1></h1>
<h1>some text</h1>
<small>ate</small>
<br/><br/><br/>
<h3>My Notes:</h3>
<p>
<script type="text/javascript">
// Get the notes from the parent page
var message_notes = window.opener.document.getElementById('sermon_notes').value;
// Replace out the new line character with a <br>
message_notes = message_notes.replace(new RegExp( "\\n", "g" ),"<br />");
document.write(message_notes);
</script>
</p>
</div>
<div class="footer">
</div>
</div>
</body>
</html>