javascript window.close can’t work on safari


พอดีพี่ปุ้ยมาถามว่าวิธีการปิดหน้า page บน safari ทำไงเลยจัดซะหน่อย
<!--Demo
<scriptlanguage="javascript">
 
functionOpenChildWin(){
  window
.open('demo.html','win1');  }
 
functionCloseChildWin(){
  win1
.close();}
 
functionCloseCurrent(){
  window
.opener=window.open('','_self','');
  window
.opener.close();}



<ahref="javascript:OpenChildWin();">
Open Child
<br/>
<ahref="javascript:CloseChildWin();">
Close Child
<br/>
<ahref="javascript:CloseCurrent();">
Close this window


-->
 
credit : http://javascriptclosewindow.com/
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: