Sample function innerHTML.
<script language=”javascript“>
function proses()
{
var val = document.getElementById(’innerhtml’).value;
document.getElementById(’html’).innerHTML = val;
}
</script>
</br></br></br>
<center>
<div id=’html’ style=’width: 100px; height:20px;background-color: #CCCCCC;‘></div></br>
<select id=’innerhtml‘ name=’innerhtml‘ onChange=’proses()’>
<option value=’HTML A’>HTML A</option>
<option value=’HTML B’>HTML B</option>
<option value=’HTML C’>HTML C</option>
</select>
</center>
function proses()
{
var val = document.getElementById(’innerhtml’).value;
document.getElementById(’html’).innerHTML = val;
}
</script>
</br></br></br>
<center>
<div id=’html’ style=’width: 100px; height:20px;background-color: #CCCCCC;‘></div></br>
<select id=’innerhtml‘ name=’innerhtml‘ onChange=’proses()’>
<option value=’HTML A’>HTML A</option>
<option value=’HTML B’>HTML B</option>
<option value=’HTML C’>HTML C</option>
</select>
</center>



0 Responses
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.