Advertisement
iliya87

Untitled

Apr 7th, 2017
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 9.98 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <!--suppress ALL -->
  3. <html>
  4.     <head>
  5.         <meta charset="utf-8">
  6.         <title>Exam_prep_FE01</title>
  7.         <style>
  8.             html,body{
  9.                 width: 100%;
  10.                 height: 100%;
  11.             }
  12.             #lastDiv{
  13.                 width: 80%;
  14.                 border: 4px ridge silver;
  15.                 margin-left: auto;
  16.                 margin-right: auto;
  17.             }
  18.             #menu{
  19.                 text-align: center;
  20.                 background-color: greenyellow;
  21.                 border: 1px solid silver;
  22.             }
  23.             a{
  24.                 margin-right: 10px;
  25.                 color: black;
  26.                 text-decoration: none;
  27.             }
  28.             a:hover{
  29.                 background-color: darkolivegreen;
  30.                 color: yellow;
  31.             }
  32.             #nested{
  33.                 width: 98%;
  34.                 margin-left: auto;
  35.                 margin-right: auto;
  36.                 border: 4px double #b3b300;
  37.                 margin-top: 15px;
  38.                 margin-bottom: 15px;
  39.             }
  40.             #quote{
  41.                 width: 80%;
  42.                 margin-left: auto;
  43.                 margin-right: auto;
  44.                 border: 2px solid silver;
  45.                 box-shadow: 4px 4px 6px #999999;
  46.                 margin-top: 15px;
  47.             }
  48.             #quete_color{
  49.                 margin-top: 5px;
  50.                 margin-bottom: 5px;
  51.                 text-align: center;
  52.                 margin-left: 15px;
  53.                 margin-right: 15px;
  54.                 background-color: greenyellow;
  55.                 padding-top: 10px;
  56.                 padding-bottom: 30px;
  57.             }
  58.             .quote_1{
  59.                 color: blue;
  60.             }
  61.             #quote_bnt{
  62.                 text-align: center;
  63.             }
  64.             #text_quote{
  65.                 font-style: italic;
  66.                 font-weight: bolder;
  67.                 font-family: sans-serif;
  68.             }
  69.             #under_quote{
  70.                 text-align: center;
  71.                 margin-top: 25px;
  72.                 margin-bottom: 25px;
  73.             }
  74.             #under_quote2{
  75.                 width: 98%;
  76.                 background-color: greenyellow;
  77.                 text-align: center;
  78.                 margin-left: auto;
  79.                 margin-right: auto;
  80.                 padding-top: 25px;
  81.                 padding-bottom: 25px;
  82.             }
  83.             #reset_btn{
  84.                 float: right;
  85.                 clear: both;
  86.             }
  87.             #belive{
  88.                 width:60%;
  89.                 margin-left: auto;
  90.                 margin-right: auto;
  91.                 border: 3px dashed black;
  92.                 background-color: greenyellow;
  93.                 text-align: center;
  94.                 margin-top: 15px;
  95.                 margin-bottom: 15px;
  96.             }
  97.             #footer{
  98.                 background-color: greenyellow;
  99.                 border: 1px solid blue;
  100.             }
  101.             #footer a{
  102.                 float: right;
  103.                 clear: both;
  104.             }
  105.         </style>
  106.     </head>
  107.     <body>
  108.         <div id="lastDiv">
  109.             <div id="menu">
  110.                 <a href="#">Начало</a>
  111.                 <a href="#">Галерия</a>
  112.                 <a href="#">FAQ</a>
  113.                 <a href="#">За нас</a>
  114.                 <a href="#">Край</a>
  115.             </div>
  116.             <div id="nested">
  117.                 <div id="quote">
  118.                     <div id="quete_color">
  119.                         <span class="quote_1">Това е блоков цитат:</span>
  120.                         <blockquote id="text_quote"></blockquote>
  121.                         <span class="quote_1">Това е span:</span><br />
  122.                         <span id="author"></span>
  123.                     </div>
  124.                     <div id="quote_bnt">
  125.                         <button type="button" name="button" id="left_btn" class="btn1" onclick="slideLeft();">&#8678; Prev</button>
  126.                         <button type="button" name="button" id="center_btn" class="btn1" onclick="addQuotes();">Добави</button>
  127.                         <button type="button" name="button" id="right_btn" class="btn1" onclick="slideRight()">Next &#8680;</button>
  128.                     </div>
  129.                 </div>
  130.                 <div id="under_quote">
  131.                     Размисли разни
  132.                 </div>
  133.                 <div id="under_quote2">
  134.                     Лична информация
  135.                 </div>
  136.                 <fieldset>
  137.                     <legend>Лични данни</legend>
  138.                     <form action="http://enevsoft.net/echo.php" target="_blank" method="post" id="user_form">
  139.                         <label for="user_name">Три имена*:</label>
  140.                         <input type="text" name="user_name" id="user_name" placeholder="Въведете трите си имена" size="30" /><br />
  141.                         Пол:
  142.                         <input type="radio" name="gender" value="male" id="male" />
  143.                         <label for="male">Мъж</label>
  144.                         <input type="radio" name="gender" value="dontKnow" id="ne_kazvam" checked="checked" />
  145.                         <label for="ne_kazvam">Не казвам</label>
  146.                         <input type="radio" name="gender" value="female" id="female" />
  147.                         <label for="female">Жена</label><br />
  148.                         <label for="date_birth">Дата на раждане:</label>
  149.                         <input type="text" name="date_birth" id="date_birth" placeholder="mm/dd/yyyy" /><br />
  150.                         <label for="user_town">Роден град:</label>
  151.                         <select id="city" name="city" onchange="addCity();">
  152.                             <option value="SZ">Stara Zagora</option>
  153.                             <option value="dr">Other</option>
  154.                         </select><br />
  155.                         Говорими езици:
  156.                         <label for="lang_bg">Български</label>
  157.                         <input type="checkbox" name="lan[bul]" value="bul" id="lang_bg">
  158.                         <label for="lang_en">Английски</label>
  159.                         <input type="checkbox" name="lan[en]" value="eng" id="lang_en">
  160.                         <label for="lang_indi">Хинди</label>
  161.                         <input type="checkbox" name="lan[hind]" value="hind" id="lang_indi"><br />
  162.                         <label for="user_tel">Телефон за контакт:</label>
  163.                         <input type="text" name="user_tel" id="user_tel" /><br />
  164.                         <textarea name="user_text" rows="8" cols="120" placeholder="Напишете нещо!!"></textarea><br />
  165.                         <button type="button" name="Submit" value="Submit" onclick="checkForm();">submit</button>
  166.                         <input type="Reset" value="Reset" id="reset_btn" />
  167.                     </form>
  168.                 </fieldset>
  169.                 <div id="belive">
  170.                     <img src="Believe In Myself.jpg" alt="belive">
  171.                 </div>
  172.             </div>
  173.             <div id="footer">
  174.                 Copyright (&copy;) 2016 Copyright Holder All Rights Reserved.
  175.                 <a href="http://webacademy.bg/stara-zagora/" target="_blanks">Web Academy</a>
  176.             </div>
  177.         </div>
  178.         <script type="text/javascript">
  179.             var allQuotes = ["Тоз, който падне в бой за свобода, той не умира…","Лудите, лудите — те да са живи!","Everybody lies"];
  180.             var allAuthors = ["Hr.Botev","Iv.Vazov","Dr.House"]
  181.             var index = 0;
  182.             document.getElementById('text_quote').innerHTML = allQuotes[index];
  183.             document.getElementById('author').innerHTML = allAuthors[index]
  184.             var autor = document.getElementById('author');
  185.             var quote = document.getElementById('text_quote');
  186.             function slideLeft(){
  187.                     if (index<1) {
  188.                        alert ('No more prev');
  189.                    } else {
  190.                        index--;
  191.                        quote.innerHTML = allQuotes[index];
  192.                        autor.innerHTML = allAuthors[index];
  193.                    }
  194.                }
  195.                function slideRight() {
  196.                    if (index >= allAuthors.length - 1) {
  197.                         alert('no more')
  198.                     }else {
  199.                         index++;
  200.                         quote.innerHTML = allQuotes[index];
  201.                         autor.innerHTML = allAuthors[index];
  202.                     }
  203.                 }
  204.             function addQuotes(){
  205.                 var quoteToAdd = prompt("Please enter new quote", "quote");
  206.                 var authorToAdd = prompt("Please enter new autor", "author");
  207.                 if (quoteToAdd !== "quote" && authorToAdd !== "author") {
  208.                    allQuotes.push(quoteToAdd);
  209.                     allAuthors.push(authorToAdd);
  210.                 }else{
  211.                     alert("invalid data");
  212.                 }
  213.             }
  214.             function addCity(){
  215.                 var citySelect = document.getElementById("city");
  216.                 if (citySelect.value == "dr") {
  217.                     var cityToAdd = prompt("Please enter new city");
  218.                     if (cityToAdd !== "") {
  219.                         citySelect.innerHTML += '<option value="' + cityToAdd + '">' + cityToAdd + '</option>';
  220.                     }
  221.                 }
  222.             }
  223.             function checkForm() {
  224.                 var user_name = document.getElementById('user_name');
  225.                 if (user_name.value === "" || user_name === null) {
  226.                     alert('input your name');
  227.                 }else {
  228.                     document.getElementById("user_form").submit();
  229.                 }
  230.             }
  231.         </script>
  232.     </body>
  233. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement