【发布时间】:2010-12-04 12:56:21
【问题描述】:
您好,我正在使用 jquery。喜欢,
<script type="text/javascript">
$(function() {
$('#usertype').change(function() {
$.post("<%=request.getContextPath()%>/CommonServlet", {utype:$('#usertype').val(),funName:'getConfigMast'}, function(j){
$("input#it").html(j);alert(j);
});
});
});
</script>
在这个 j 中包含一些模型对象,我必须在我的同一个 jsp 页面中迭代他的对象,并且我必须在 <table> 的文本字段中显示这些值。当我从相同<table>的组合框中选择值时,将调用 jquery 函数
和jsp表:
<table >
<tr>
<td><input name="filetype" type="text" class="formTxtBox_1" id="filetype"/></td>
</tr>
<tr>
<td>
<select name="usertype" id="usertype" >
<option >- Select Type of User -</option>
<option value="admin"> administrator </option>
<option selected="true" > normal</option>
<option> member</option>
</select> </td>
</tr>
<tr>
<td><input name="singlefile" type="text" id="singlefile"/></td>
</tr>
<tr>
<td><input name="totalfile" type="text" id="totalfile"/></td>
</tr>
<table>
【问题讨论】:
标签: javascript jquery ajax jsp