묻고답하기
고수님... 검색 부분에 엑스표가 표시되어 글씨가 모두 지워지게 부탁드립니다.
2019.06.06 09:31
고수님... 검색 부분에 엑스표가 표시되어 글씨가 모두 지워지게 부탁드립니다.
검색을 하고 난 다음 글씨가 길게 남아서 하나씩 지우려하니 불편합니다.
그래서 검색란 부분에 엑스표 부분을 넣어서 한번만 누르면 글씨가 모두 지워지게 가능할까요?
감사합니다.
밑은 html 소스입니다.
<meta name="viewport" content="width=device-width, initial-scale=1">
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="keywords" content=" />
<meta name="author" content=">
<link rel="icon" href="favicon.ico">
<title></title>
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/bootstrap-theme.min.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="css/jquery-ui.min.css" rel="stylesheet">
<link href="css/jquery-ui.theme.min.css" rel="stylesheet">
<link href="css/jquery-ui.structure.min.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<div class="content">
<!--
<div class="starter-template">
<h1>Bootstrap starter template</h1>
<p class="lead">Use this document as a way to quickly start any new project.<br> All you get is this text and a mostly barebones HTML document.</p>
</div>
-->
<h4></h4>
<div id="find">
<input type="text" class="input-lg" id="autocomplete" placeholder="">
<button type="submit" class="btn btn-lg btn-success" id="search">Search</button>
</div>
<script language="JavaScript">
var theTarget = "_new";
function goThere(){
if(!document.theForm.theMenu.selectedIndex==""){
window.open(document.theForm.theMenu.options[document.theForm.theMenu.selectedIndex].value,theTarget,"");}}
</script>
<form name="theForm">
<select name="theMenu" size=1 onChange="goThere()">
<option selected value="">
</select>
</form>
<div id="table" style="border:groove">
<!--Rezultat pretrage-->
</div>
<div id="introduction">
<label class="label label-success" for="intro" id="lintro"></label>
<output id="intro"></output>
<!--// 카운터-->
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<!-- <li class="active"><a href="#">Home</a></li>
<li><a href="#about">About</a></li>
<li><a href="#contact">Contact</a></li>-->
</ul>
<ul class="nav navbar-nav navbar-right">
<!-- <li class="active"><a href="#">Home</a></li>
<li><a href="#about">About</a></li>
<li><a href="#contact">Contact</a></li>-->
<li><a>words are <span id="wordcount"></span></a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>
<!--// 카운터-->
</div>
</div>
</div><!-- /.container -->
<footer class="footer">
<div class="container col-md-6">
<p class="text-muted"><center>© E-mail: </a></center></p>
</div>
</footer>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<!--<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>-->
<script src="js/jquery-2.1.3.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="js/ie10-viewport-bug-workaround.js"></script>
<!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
<!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
<script src="js/ie-emulation-modes-warning.js"></script>
<script src="js/jquery-ui.min.js"></script>
<script src="js/rijecnik.js"></script>
</body>
</html>
https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_button_type
이거 보시면서 reset을 참조해 보세요.