Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ac693bee67 | |||
| c01329afdb |
38
css/style.css
Normal file
38
css/style.css
Normal file
@@ -0,0 +1,38 @@
|
||||
*{
|
||||
margin: 0 auto;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
a, h1, h2, h3, h4, h5, h6{
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.flex{
|
||||
display: flex;
|
||||
}
|
||||
|
||||
/* :root{
|
||||
--
|
||||
} */
|
||||
|
||||
/* ---------- */
|
||||
|
||||
/* ----------- main ----------- */
|
||||
.inputText{
|
||||
display: hidden;
|
||||
}
|
||||
|
||||
.inputLink{
|
||||
display: hidden;
|
||||
}
|
||||
|
||||
.form1{
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.radio1Div{
|
||||
flex-direction: column;
|
||||
}
|
||||
70
index.html
Normal file
70
index.html
Normal file
@@ -0,0 +1,70 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
<script src="js/cases.js" defer></script>
|
||||
<title>Оставить заявку</title>
|
||||
</head>
|
||||
<body>
|
||||
<!-- ----------- header ------------ -->
|
||||
<header class="header">
|
||||
<div class="wrapper">
|
||||
<div class="container">
|
||||
<div class="header-inner">
|
||||
<ul class="headerUL">
|
||||
<li class="headerLi"></li>
|
||||
<li class="headerLi"></li>
|
||||
<li class="headerLi"></li>
|
||||
<li class="headerLi"></li>
|
||||
<li class="headerLi"></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- --------------- main -------------- -->
|
||||
<main class="main">
|
||||
<div class="wrapper">
|
||||
<div class="container">
|
||||
<div class="main-inner">
|
||||
<h1 class="zayavkaH1">Оставить заявку на товар</h1>
|
||||
<form action="" method="post" class="form1 flex">
|
||||
<!-- имя -->
|
||||
<label for="name">Имя</label>
|
||||
<input type="text" name="name" id="name">
|
||||
|
||||
<!-- tg -->
|
||||
<label for="tg">Telegram для обратной связи</label>
|
||||
<input type="text" name="tg" id="tg">
|
||||
|
||||
<!-- radio -->
|
||||
<label for="radioDiv">Тип обращения</label>
|
||||
<div class="radioDiv flex">
|
||||
<div class="radio1Div">
|
||||
<label for="name">Ссылка</label>
|
||||
<input type="radio" name="radio" id="radio1" onclick="change()">
|
||||
<div id="inputLink">
|
||||
<input type="url" name="link" id="linkTao">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="radio1Div">
|
||||
<label for="name">Описать необходимый товар</label>
|
||||
<input type="radio" name="radio" id="radio2" onclick="change()">
|
||||
<div id="inputText" >
|
||||
<input type="text" name="text" id="linkItem">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
20
js/cases.js
Normal file
20
js/cases.js
Normal file
@@ -0,0 +1,20 @@
|
||||
let linkTao = document.getElementById('inputLink')
|
||||
let textTao = document.getElementById('inputText')
|
||||
|
||||
function change(){
|
||||
if (document.getElementById('radio1').checked && document.getElementById('radio2').checked == false){
|
||||
linkTao.style.display = 'block';
|
||||
textTao.style.display = 'none';
|
||||
console.log(1)
|
||||
}
|
||||
else if (document.getElementById('radio1').checked == false && document.getElementById('radio2').checked){
|
||||
textTao.style.display = 'block';
|
||||
linkTao.style.display = 'none';
|
||||
console.log(2)
|
||||
}
|
||||
else{
|
||||
textTao.style.display = 'none';
|
||||
linkTao.style.display = 'none';
|
||||
console.log(3)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user