1
こんにちは、私はjqueryを使用しています。以下のように、このJでjspのjavascriptの値にアクセスするには?
<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>
は私が私の同じJSPページ内の自分のオブジェクトを反復処理する必要があるいくつかのモデルオブジェクトと私は<table>
でテキストフィールドに表示する必要があり、これらの値をcontians。私は同じ<table>
とJSPテーブルのコンボボックスから値を選択すると、ここでjqueryの関数が呼び出されます:
<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>