iT邦幫忙

DAY 22
6

Javascript cookbook系列 第 18

Javascript cookbook (22)

灑花灑花
開啟視窗並寫入文字
灑花灑花
document.write()
document.open()
document.close()

可開啟視窗並寫入文字

程式碼如下:

		<script>
			function Event1(){
				//create a blank window
				var w1 = window.open("", "mywin");
				//open that to write
				w1.document.open();
				w1.document.write("This is first line");
				w1.document.close();
			}			
		</script>
    
    
        <input type="button" value="Press to start" onclick="Event1()">
    


鐵人文總整理


上一篇
Javascript cookbook (21)
下一篇
Javascript cookbook (23)
系列文
Javascript cookbook26
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

1 則留言

我要留言

立即登入留言