<%=RmLanguageHelper.getValue(request,"updateTaxRatePage.jsp.resultConditionForm.selType") %>这个东东是国际化
$(document).ready(function()
{
$("#tab1 tr[id]").hide();
//用于修改时显示对应的操作类型如:continent,country,city
var continentId=$("#continentId").val();
var countryId=$("#countryId").val();
var cityId=$("#cityId").val();
if(continentId!=null && continentId!=""){
$("#selType").val('continent');
$("#tab1 tr[id=continent]").show();
}
if(countryId!=null && countryId!=""){
$("#selType").val('country');
$("#tab1 tr[id=country]").show();
}
if(cityId!=null && cityId!=""){
$("#selType").val('city');
$("#tab1 tr[id=city]").show();
}
$("#selType").change(function()
{
showAndHide();
});
});
function showAndHide()
{
$("#tab1 tr:lt(4) input").val("");//如何选择添加税率不同时,清空上一次选择的(只对前4行有效)
var selectOption = $("#selType option:selected");
if(selectOption != null && selectOption.val() != "")
{
var selectValue = selectOption.val();
if(selectValue == "city")
{
$("#tab1 tr[id=city]").show();
$("#tab1 tr[id][id!=city]").hide();
}
else if(selectValue == "country")
{
$("#tab1 tr[id=country]").show();
$("#tab1 tr[id][id!=country]").hide();
}
else
{
$("#tab1 tr[id=continent]").show();
$("#tab1 tr[id][id!=continent]").hide();
}
}
else
{
$("#tab1 tr[id]").hide();
}
}
==============================================================================================
<table id="tab1" class="contentTableForm">
<input type="hidden" name="dbid" id="dbid" value="<bean:write name="taxRate" property="dbid"/>">
<tr>
<td class="title"><span class="mustinput">*</span><%=RmLanguageHelper.getValue(request,"updateTaxRatePage.jsp.resultConditionForm.selType") %></td>
<td class="con">
<select id="selType" class="textFieldSelect" name="selType" validateType="notNull">
<option value="">--<%=RmLanguageHelper.getValue(request,"updateTaxRatePage.jsp.resultConditionForm.selected") %>--</option>
<option value="continent"><%=RmLanguageHelper.getValue(request,"updateTaxRatePage.jsp.resultConditionForm.select.continent") %></option>
<option value="country"><%=RmLanguageHelper.getValue(request,"updateTaxRatePage.jsp.resultConditionForm.select.country") %></option>
<option value="city"><%=RmLanguageHelper.getValue(request,"updateTaxRatePage.jsp.resultConditionForm.select.city") %></option>
</select>
</td>
<td class="err"></td>
<td class="title"></td>
<td class="con"></td>
<td class="err"></td>
</tr>
<tr id="continent">
<input type="hidden" name="continentdbid" id="continentId" value="<bean:write name="taxRate" property="continentdbid"/>"/>
<td class="title"><span class="mustinput">*</span><%=RmLanguageHelper.getValue(request,"updateTaxRatePage.jsp.resultConditionForm.continentName") %></td>
<td class="con">
<input type="text" class="textFieldInputReference" value="<bean:write name="taxRate" property="continentname"/>" hiddenInputId="continentId,continentENname" id="continentName" name="continentname" οnfοcus="continent(this);" οndblclick="javascript:referenceContinent();" /></td>
<td class="err"></td>
<td class="title"><span class="mustinput">*</span><%=RmLanguageHelper.getValue(request,"updateTaxRatePage.jsp.resultConditionForm.continentEName") %></td>
<td class="con">
<input type="text" class="textFieldInputReference" value="<bean:write name="taxRate" property="continentenname"/>" hiddenInputId="continentId,continentEName" id="continentENname" name="continentenname" οnfοcus="continent(this);" οndblclick="javascript:referenceContinent();" /></td>
<td class="err"></td>
</tr>
<tr id="country">
<input type="hidden" name="countrydbid" id="countryId" value="<bean:write name="taxRate" property="countrydbid"/>"/>
<td class="title">span class="mustinput">*</span><%=RmLanguageHelper.getValue(request,"updateTaxRatePage.jsp.resultConditionForm.countryname") %></td>
<td class="con">
<input type="text" class="textFieldInputReference" value="<bean:write name="taxRate" property="countryname"/>" hiddenInputId="countryId,countryENname" id="countryName" name="countryname" οnfοcus="country(this);" οndblclick="javascript:referenceCountry();" />
</td>
<td class="err"></td>
<td class="title">span class="mustinput">*</span><%=RmLanguageHelper.getValue(request,"updateTaxRatePage.jsp.resultConditionForm.countryenname") %></td>
<td class="con">
<input type="text" class="textFieldInputReference" value="<bean:write name="taxRate" property="countryenname"/>" hiddenInputId="countryId,countryName" id="countryENname" name="countryenname" οnfοcus="country(this);" οndblclick="javascript:referenceCountry();"/>
</td>
<td class="err"></td>
</tr>
<tr id="city">
<input type="hidden" name="citydbid" id="cityId" value="<bean:write name="taxRate" property="citydbid"/>"/>
<td class="title"><span class="mustinput">*</span><%=RmLanguageHelper.getValue(request,"updateTaxRatePage.jsp.resultConditionForm.cityName") %></td>
<td class="con">
<input type="text" class="textFieldInputReference" value="<bean:write name="taxRate" property="cityname"/>" hiddenInputId="cityId,cityENname" id="cityName" name="cityname" οnfοcus="city(this);" οndblclick="javascript:referenceCity();" /></td>
<td class="err"></td>
<td class="title"><span class="mustinput">*</span><%=RmLanguageHelper.getValue(request,"updateTaxRatePage.jsp.resultConditionForm.cityEName") %></td>
<td class="con">
<input type="text" class="textFieldInputReference" value="<bean:write name="taxRate" property="cityenname"/>" hiddenInputId="cityId,cityName" id="cityENname" name="cityenname" οnfοcus="city(this);" οndblclick="javascript:referenceCity();"/></td>
<td class="err"></td>
</tr>