Показать сообщение отдельно
  #2 (permalink)  
Старый 01.07.2012, 18:30
Аватар для Dim@
Профессор
Отправить личное сообщение для Dim@ Посмотреть профиль Найти все сообщения от Dim@
 
Регистрация: 21.04.2012
Сообщений: 951

<html>
<head>
<meta charset='utf-8'>
<title></title>
<style type='text/css'>
</style>
<script type='text/javascript'>
document.i = 0;
function one(arg){
 switch(arg){
  case 1:{document.i += 15; break}
  case 2:{document.i += 30; break}
  case 3:{document.i += 60; break}
 }
 document.getElementById('one').style.display = 'none';
 document.getElementById('two').style.display = 'block';
}
function two(arg){
 switch(arg){
  case 1:{document.i *= 2; break}
  case 2:{document.i *= 3; break}
  case 3:{document.i *= 4; break}
 }
 document.getElementById('two').style.display = 'none';
 document.getElementById('three').style.display = 'block';
}
function three(arg){
 switch(arg){
  case 1:{document.i *= 1; break}
  case 2:{document.i *= 2; break}
  case 3:{document.i *= 3; break}
 }
 document.getElementById('three').style.display = 'none';
 alert(document.i);
}
</script>
</head>
<body>
<div id='one'>
1. Сколько времени вы провели на нашем сайте:
<input type='button' onclick='one(1)' value='15 минут'>
<input type='button' onclick='one(2)' value='30 минут'>
<input type='button' onclick='one(3)' value='60 минут'>
</div>
<div id='two' style='display:none'>
2. За это время какой контент вы посмотрели:
<input type='button' onclick='two(1)' value='Истории'>
<input type='button' onclick='two(2)' value='Картинки'>
<input type='button' onclick='two(3)' value='Видео'>
</div>
<div id='three' style='display:none'>
3. Какие эмоции вы испытывали:
<input type='button' onclick='three(1)' value='Не каких'>
<input type='button' onclick='three(2)' value='Усмехались'>
<input type='button' onclick='three(3)' value='Смеялись'>
</div>
</body>
</html>

Последний раз редактировалось Dim@, 01.07.2012 в 19:06.
Ответить с цитированием