dimitri: iframe

Beitrag lesen

<script type="text/javascript">
<!--
  function selektierterText()
  {var str= a1.document.selection;

//wenn ich document.write("<b>"+str.createRange().text+"</b>");
  schreibe öffnet sich ein neues fenster und es erscheint der selsktierte text fett---also ist der fehler hier zu suchen.

a1.document.write("<b>"+str.createRange().text+"</b>");

}

// Set the focus to the editor
function setFocus() {
 textEdit.focus()

}

// Initialize the editor with an empty document
function initEditor() {
a1.document.designMode="On"
a1.document.open()
a1.document.close()
a1.focus()

}
window.onload = initEditor
</script>

<BODY SCROLL=No >
<form name="a2">
<input type="button" value="zeigen" onMouseDown="selektierterText()">

</form>
<IFRAME ID=a1>Test
</IFRAME>