이것은 내 작은 프로그램입니다. 콤보 상자 값을 가져 가면 어떻게됩니까?javascript에서 콤보 상자 값 검색
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="stylesheet" type="text/css" href="NewFile.css">
<title>Insert title here</title>
<script type="text/javascript">
function calcola(){
var op = String(document.getElementById("combo").value);
alert(op);
}
</script>
</head>
<body>
<div class="in">
Inserire il primo numero:
<input type="text" id="primo">
<br>
Inserire il secondo numero:
<input type="text" id="secondo">
</div>
<div class="in">
<select id="combo">
<option selected="selected">*</option>
<option>/</option>
<option>+</option>
<option>-</option>
</select>
</div>
<div>
<input type="button" name="bottone" value="Premi" onclick="calcola();">
</div>
</body>
</html>
이 프로그램은 계산기 여야하지만 계산을 수행하는 연산자를 알아야하기 때문에이 코드는 대부분 생략했습니다. 함수 내부
문제는 무엇인가를 시도? http://jsbin.com/oduqop/1 – Musa