Entry
JavaScript: Window: Close: Hyperlink: Create: How to create hyperlink to close window in JavaScript?
Jan 6th, 2005 09:25
Knud van Eeden,
----------------------------------------------------------------------
--- Knud van Eeden --- 06 January 2005 - 06:27 pm --------------------
JavaScript: Window: Close: Hyperlink: Create: How to create hyperlink
to close window in JavaScript?
---
in general:
--- cut here: begin --------------------------------------------------
<A
HREF="#"
ONCLICK='
self.close();
'
>
Your text comes here
</A>
--- cut here: end ----------------------------------------------------
or also:
--- cut here: begin --------------------------------------------------
<A
HREF="#"
ONCLICK='
window.close();
'
>
Your text comes here
</A>
--- cut here: end ----------------------------------------------------
or also:
--- cut here: begin --------------------------------------------------
<A
HREF="javascript: self.close();"
>
Your text comes here
</A>
--- cut here: end ----------------------------------------------------
or also:
--- cut here: begin --------------------------------------------------
<A
HREF="javascript: window.close();"
>
Your text comes here
</A>
--- cut here: end ----------------------------------------------------
e.g.
--- cut here: begin --------------------------------------------------
<!-------------------------------------------------------------------->
<HTML>
<!-------------------------------------------------------------------->
<BODY>
<!-------------------------------------------------------------------->
<A
HREF="javascript: window.close();"
>
Close window
</A>
<!-------------------------------------------------------------------->
</BODY>
<!-------------------------------------------------------------------->
</HTML>
<!-------------------------------------------------------------------->
--- cut here: end ----------------------------------------------------
---
---
e.g.
--- cut here: begin --------------------------------------------------
<!-------------------------------------------------------------------->
<HTML>
<!-------------------------------------------------------------------->
<BODY>
<!-------------------------------------------------------------------->
<A
HREF="#"
ONCLICK='
self.close();
'
>
Close window
</A>
<!-------------------------------------------------------------------->
</BODY>
<!-------------------------------------------------------------------->
</HTML>
<!-------------------------------------------------------------------->
--- cut here: end ----------------------------------------------------
---
---
Internet: see also:
---
----------------------------------------------------------------------