����� 5
�� 3: ���������� �� ��� ��� �����.
���� �� ����� ��� �������� (Links) ���, ���� �� ����.
���� ���� �"� ����� ���� �� ��� �����. ����� ���� ��� �� ������� �������:
<form name="first_form">
<input type="text" name="first_text" value="Are you happy?">
</form>
�������� (Links) ������ �� ����� ��:
<a href="#" onMouseOver="window.document.first_form.first_text.value='Clap clap!';">Yes, and I know it.</a>
<a href="#" onMouseOver="window.document.first_form.first_text.value='Sour puss!';">No!</a>
��� �� ����� ��� �������; ���� ����� ���:
windows.document.first_form.first_text.value=Clap clap!
�����: "��� �� ����� �����: first_form �����, ��� �� ����� �����: first_text ���� �� �� ���� 'Clap clap!'." ����� ����� ����� ����� ����. ���� ���� ���� ������ �- SRC �� ������. ����� �- SRC, ���� ����� �� ���.
��� ��� ����� �� ���� ����� ������ ����� ������� �"� ����� ������ ����. ������:
������ �������� ��� ��� ����� ���� ������� ����� , ����� ���:
<form name="form_two">
<textarea name="the_textarea" rows=10 cols=60>
Mouse over below to see the first verse of
The Webmonkey song, adapted from
"I Wanna Be Like You" (The Monkey Song)
from Walt Disney's The Jungle Book
written by Richard M. Sherman and Robert B. Sherman
</textarea>
</form>
������� ������� �� ���� ��� ��� ����� ������:
<a href="#" onMouseOver="window.document.form_two.the_textarea.value=first_part;">Part 1</a>
<a href="#" onMouseOver="window.document.form_two.the_textarea.value=second_part;">Part 2</a>
����� ������ ��� ������ ������ ������ ���� �� ����� ����� ��� ���� ������ ���� ����� ���� �- Header. ��� ���� ����� �� ��� ����� ��� ��. ��� ����� ��� �� ����� ����, �� ��� ������ �� ���� ������� ������ ���� �-HTML "��� ����� ��� ��� ���". ��� ����� ���� ��������:
var first_part = "Now I'm the king of the swingers\n
Oh, the jungle VIP\n
I've reached the top and had to stop\n
And that's what botherin' me";
��� �� ��� 'n\' � ���� ��� ����� ��������� ������ ����� �����. ����� ����, ���� ���� ���� �� ��� HTML, ����� ����� ���� ����� �� ��. ��� �� ��� ���� ���� ������� <Pre>, �� �� ��� ���� ������ ����� �� �-'n\' �� ������.
����� ������ ������ �� ������� �����, javascript ����� �� �� ������� ����� ������� �������� �����. �����, ��� ���.
���� ������ ���
��� ��� «--
|