Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
кит.docx
Скачиваний:
4
Добавлен:
26.11.2018
Размер:
46.88 Кб
Скачать
  1. Лабораторна робота №9

  2. <script language="JavaScript">

function SuperPower()

{

var sum1,sum2,sum3,sum4,ans1,ans2,ans3,ans4,opinion;

sum1=parseInt(document.1.value)+

parseInt(document.2.value)+

parseInt(document.3.value)+

parseInt(document.4.value)+

parseInt(document.5.value)+

parseInt(document.6.value)+

parseInt(document.7.value)+

parseInt(document.8.value)+

parseInt(document.9.value)+

parseInt(document.10.value)+

parseInt(document.11.value)+

parseInt(document.12.value)+

parseInt(document.13.value)+

parseInt(document.14.value)

sum2=parseInt(document.15.value)+

parseInt(document.16.value)+

parseInt(document.17.value)+

parseInt(document.18.value)+

parseInt(document.19.value)+

parseInt(document.20.value)+

parseInt(document.21.value)+

parseInt(document.22.value)+

parseInt(document.23.value)+

parseInt(document.24.value)+

parseInt(document.25.value)+

parseInt(document.26.value)+

parseInt(document.27.value)+

parseInt(document.28.value)

sum3=parseInt(document.29.value)+

parseInt(document.30.value)+

parseInt(document.31.value)+

parseInt(document.32.value)+

parseInt(document.33.value)+

parseInt(document.34.value)+

parseInt(document.35.value)+

parseInt(document.36.value)+

parseInt(document.37.value)+

parseInt(document.38.value)+

parseInt(document.39.value)+

parseInt(document.40.value)+

parseInt(document.41.value)+

parseInt(document.42.value)

sum4=parseInt(document.43.value)+

parseInt(document.44.value)+

parseInt(document.45.value)+

parseInt(document.46.value)+

parseInt(document.47.value)+

parseInt(document.48.value)+

parseInt(document.49.value)+

parseInt(document.50.value)+

if(sum1>=10) {ans1='Вы 100%-ный Холерик'};

if(sum1>=9 && sum<=5){ans1='Вы стабильный холерик'};

if(sum1>=4 && sum>=0){ans1='Вы не холерик'};

if(sum2>=10) {ans2='Вы 100%-ный сангвиник'};

if(sum2>=9 && sum<=5){ans2='Вы стабильный сангвиник'};

if(sum2>=4 && sum>=0){ans2='Вы не сангвиник'};

if(sum3>=10) {ans3='Вы 100%-ный флегматик'};

if(sum3>=9 && sum<=5){ans3='Вы стабильный флегматик'};

if(sum3>=4 && sum>=0){ans3='Вы не флегматик'};

if(sum4>=10) {ans4='Вы 100%-ный меланхолик'};

if(sum4>=9 && sum1<=5){ans4='Вы стабильный меланхолик'};

if(sum4>=4 && sum1>=0){ans4='Вы не меланхолик'};

opinion=ans1+' , '+ans2+' , '+ans3+' , '+ans4;

document.write=opinion;

}

</script>

<body>

<H1> КЛАСС ХОЛЕРИК </H1>

<table border="1" cellspacing="1" cellpadding="1" width="300">

<tr>

<td>1. Отличаетесь неусидчивостью </td><td>

Да <input name="1" type="radio" value="1" >

Нет<input name="1" type="radio" checked="true">

</td>

</tr><tr><td>2. Вспыльчивы и импульсивны. </td><td>

Да <input name="2" type="radio" value="1" >

Нет<input name="2" type="radio" checked="true">

</td>

</tr> <tr><td>3. Чаще всего нетерпеливы. </td> <td>

Да <input name="3" type="radio" value="1" >

Нет<input name="3" type="radio" checked="true">

</td>

</tr> <tr>

<td>4. Инициативны и решительны.</td>

<td>

Да <input name="4" type="radio" value="1" >

Нет<input name="4" type="radio" checked="true">

</td>

</tr> <tr><td>5. Упорны, даже упрямы.</td><td>

Да <input name="5" type="radio" value="1" >

Нет<input name="5" type="radio" checked="true">

</td>

</tr><tr><td>56. Вам приятно, когда окружающие сопереживают вам.</td><td>

Да <input name="56" type="radio" value="1" >

Нет<input name="56" type="radio" checked="true">

</td>

</tr>

</table>

<center>

<input name="tt">

<input type="button" value="Получить результат" onclick="SuperPower()"> </center>

</body>

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]