Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.sao.ru/cats/~satr/JS/REF/links.htm
Дата изменения: Wed Apr 15 11:01:50 1998
Дата индексирования: Tue Oct 2 05:20:33 2012
Кодировка:

Поисковые слова: m 5
Links and anchors examples

Using an Absolute URL in a Link

<P>You can find all the latest news from Netscape at <A HREF="http://home.netscape.com">Netscape's Home Page</A>.

You can find all the latest news from Netscape at Netscape's Home Page.

Using a Relative URL in a Link

<P> You can learn how to use style sheets and how to position HTML content by reading the <A HREF="/docs/manuals/communicator/dynhtml/index.htm"> Guide to Dynamic HTML in Netscape Communicator</A>.

You can learn how to use style sheets and how to position HTML content by reading the Guide to Dynamic HTML in Netscape Communicator.

Jumping to an Anchor in the Same Document

<P>To return to the top of this page, <A HREF="#anchor1"> jump to anchor 1 in this document</A>.

To return to the top of this page, jump to anchor 1 in this document.

Jumping to an Anchor in Another Document

<P>Jump to the second section <A HREF="nowhere.htm#section2"> A Cold Autumn Day</A> in the mystery "A man from Nowhere".

Jump to the second section A Cold Autumn Day in the mystery "A man from Nowhere".

Including an Image in a Link

<A HREF="tulip.htm"><IMG SRC="images/tulip.gif"> More about tulips.</A> More about tulips.

Specifing JavaScript as a Link

<P>If you click on this link, you'll see a <A HREF="javascript:checkBeforeProceeding();"> confirmation dialog box.</A> <SCRIPT> function checkBeforeProceeding () { if (confirm("This link opens another window. Would you like to proceed?")) window.open('nowhere.htm', 'newWin'); } </SCRIPT>

If you click on this link, you'll see a confirmation dialog box.

Specifing an onMouseOut Event Handler for a Link

<P>If you move the mouse over and then away from <A HREF="nowhere.htm" window="new_window" onMouseOut='alert("This link opens the mystery story " + "The Man from Nowhere in another Window.")';> The Man From Nowhere</A>, a dialog box appears telling you what the link will do.

If you move the mouse over and then away from The Man From Nowhere, a dialog box appears telling you what the link will do.

Sending a Mail Message

<P>If you need help with this product, you can send email to <A HREF="mailto:support@somecompany.com?subject=help needed&cc=carbon@somecompany.com&body=I am delighted with your software, but I have a small problem that I would like you to fix for me."> the support group.</A>

If you need help with this product, you can send email to the support group.

Opening an FTP Location

<P>You can download the files from <A HREF="ftp://ftp.somecompany.com">ftp://ftp.somecompany.com</A>.

You can download the files from ftp://ftp.somecompany.com.