���� ������ ��:
1: ����� ������ 4
2: ���� �������
3: ������ �����
4: ��� �� ������ while
5: ������ for
6: ������ �������
7: ������ ������
8: ������
9: ������ �������
10: ������ �- DOM
11: ��������
12: �������� void
13: �������
14: �������� �������
15: ����� ��������
16: ����� ����� 4
|
| | | | | | | | | | | | | | | | | |
����� 4
�� 2: ���� �������.
������ ��� ������� ���� ���� ������ ���� ���� ���. ��� ����, ������, ���� ������� ���� ����� ������ �� ����� �� ������ ������. �� ��� ������� ����� ��� �������� ����, ���� ����� ���, ��� ������ ����:
var the_password = "pass the wrench";
var answer = prompt("What's the woyd?","");
if (answer != the_password) {
answer = prompt("What's the woyd?","");
if (answer != the_password) {
document.write("You lose!<p>");
} else {
document.write("That's right!<p>");
}
} else {
document.write("That's right!<p>");
}
������, ������ ��"� �� ����� �� ��� ������� ���� ��� ���� �� ������ �� ����� �����. ��� ���� ��� ����� �����, ��� �� ����� ������� ����� ���� ����� ��� �� ������. ��� ���� ��� �� ���� ������ if-then, ��� ���� ��� ��. ���� ����� ����� ���� �� ���� ���� ���� �� �� �����, ��� �"� ����� ������. ����� �� ��� ���� ������ ������ �� ��� ������ ������ �� ������ �� ���� ��� ����� �� ����� �����. ����� ��� ���� ����� ���� ������ while ������. ������ ���: "pass the wrench".
���� ������ ���
��� ��� «--
|
|