이 코드는 매우 간단하지만 작동하지 않는 이유는 무엇입니까?콤보 상자에서 데이터를 가져와 Javascript로 텍스트 상자에 입력하는 방법?
<html>
<head>
<script type=”text/javascript“>
function Expedisi()
{
var x=document.getElementById("cmb");//this the script for get data combo box
var y = document.getElementById("txt");
getCmb = x.value;
y.value = getCmb;
alert(x);
}
</head>
<body>
<select name="JENIS" id="cmb" data-role="slider" onChange="Expedisi()">
<option value="Suplier">Sup</option>
<option value="Expedisi">Exp</option>//if i pick one of this the value will be input on text box
</select>
<input type="text" name="BKIRIM" id="txt" value=""> //this the destination value
</body>
</html>
아무도 도와 줄 수 있습니까? 이 스크립트가 실행되지 않았기 때문에?
감사합니다.
브라우저에서 자바 스크립트를 사용하도록 설정되어 있는지 확인하십시오. 어떤 브라우저를 사용하고 있습니까? –
당신은'script' 태그를 닫지 않았습니다. – Novak
'type = "text/javascript"의 미친 따옴표는 무엇입니까? – Musa