Try something like that :
<select id="choose">
<option value="test1">Test1</option>
<option value="test2">Test2</option>
<option value="test3">Test3</option>
</select>
<div id="update"></div>
<script type="text/javascript">
$('#choose').change(function(event) {
$('#update').html('This is ' + $('#choose').val() + ' and other info');
});
</script>
If you want to make it with AJAX, change the javascript function to something like that:
<script type="text/javascript">
$('#choose').change(function(event) {
$.post('info.php', { selected: $('#choose').val() },
function(data) {
$('#update').html(data);
}
);
});
</script>
And in your info.php, you'll have something like:
<?php
$selected = isset($_POST['selected']) ? $_POST['selected'] : 'nothing';
echo("This is $selected and other info");
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…