輸入 HTML 後開新視窗 window.open()
<!-------------------------------------------------------------------------------->
<script>
function openwinwin(x){
var x0 = document.getElementById(x);
var x1 = x0.querySelector(".textA");
var inputwin= window.open('','stwin1','width=500, height=350, left=0,top=0');
inputwin.close();
var inputwin= window.open('','stwin1','width=500, height=350, left=0,top=0'); inputwin.document.write(x1.value); }
</script>
<!--------------------------------------------------------------------------------><br />
<div id="wt17718310">
<form>
<input onclick="openwinwin('wt17718310')" style="background-color: silver; border: 3px outset #d5d5d5; color: black; cursor: pointer; font-size: 20px; width: 150px;" type="button" value="彈出通知視窗" />
<input onclick="this.form.reset()" style="background-color: silver; border: 3px outset #d5d5d5; color: black; cursor: pointer; font-size: 20px; width: 150px;" type="button" value="清除重試" />
<br />
<textarea class="textA" rows="20" spellcheck="false" style="width: 100%;" wrap="logical">
123
</textarea></form>
</div>
沒有留言:
張貼留言