每次在我的选择选项中选择一个新选项时,我都会尝试更改几个文本字段。这是我目前拥有的代码,有什么想法我哪里出错了吗?谢谢。
<script type="text/javascript">
$("#combo").change(function() {
var value = $(this).val();
$.get(document, {type: value});
});
</script>
<td class="bold"><label for='addType'>Select Type to Add : </label>
<select name="addType" id="combo">
<option value="book">Book</option>
<option value="author">Author</option>
<option value ="publisher">Publisher</option>
<option value="customer">Customer</option>
</select>
<?php
$type['type'] = $_GET['type'];
if ($type['type'] == 'author') {
print "test";
}
?>