IT/JavaScript
자바스크립트 - [select]onchange를 이용한 select 선택
storya
2016. 3. 24. 19:31
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">
<title>Insert title here</title>
<script type="text/javascript">
<!--
function moveToURL(url){
document.location.href= url;
}
//-->
</script>
</head>
<body>
<form name="myform">
<select name="" onchange="moveToURL(this.value)">
<option>선택</option>
<option value="http://www.naver.com">네이버</option>
<option value="http://www.daum.net">다음</option>
</select>
</form>
</body>
</html>
반응형