<tr>
<th width="150"><i class="require-red">*</i>股票代码:</th>
<td><input class="common-text negativeValue3" id="stockCode" name="stockCode" size="30" type="text" required maxlength="9" οnkeyup="mkdir();" />
</td>
</tr>
<tr>
<th width="150"><i class="require-red">*</i>股票类型:</th>
<td><select style="width: 210px;height: 30px;"
id="stockType" name="stockType" class="common-text" required>
<option value="">--请选择--</option>
<option value="SZ" ${STATUS=="SZ"?'selected':''}>深证</option>
<option value="SH" ${STATUS=="SH"?'selected':''}>上证</option>
</select></td>
<th width="150"><i class="require-red">*</i>股票代码:</th>
<td><input class="common-text negativeValue3" id="stockCode" name="stockCode" size="30" type="text" required maxlength="9" οnkeyup="mkdir();" />
</td>
</tr>
<tr>
<th width="150"><i class="require-red">*</i>股票类型:</th>
<td><select style="width: 210px;height: 30px;"
id="stockType" name="stockType" class="common-text" required>
<option value="">--请选择--</option>
<option value="SZ" ${STATUS=="SZ"?'selected':''}>深证</option>
<option value="SH" ${STATUS=="SH"?'selected':''}>上证</option>
</select></td>
</tr>
===============================================================================================
<script type="text/javascript">
function mkdir() {
var $stockCode = $("#stockCode");
var c = document.getElementById("stockType");
if ($stockCode.val().indexOf('6') == 0) {
c.value = 'SH';
} else {
c.value = 'SZ';
}
}
</script>