问题描述
- 怎么把下拉框的月份或者年装换成天数
-
如图片那样 吧下拉框的一天通知,一个月,一年......等等 转换成天数用于计算
比如说 一天就是一天 一个月是30天 三个月90天 一年365 天这样
请问用jQuery或者js怎么弄 不用弄到前面显示 只要转换好就可以 用于计算
解决方案
var tmp = '';
for (var i = 0; i < o.length; i++) {
tmp += "<option value='" + o[i].id + "'>" + o[i].val + "</option>"
}
$("#sel1").append(tmp);
//////////计算对应的天数
var arr,day
for (var i = 0, j = o1.length; i < j; i++) {
arr = o1[i].val;
for (var k = 0; k < arr.length; k++) {
day = arr[k].name;
switch (day.charAt(0)) {
case 'd': day = day.charAt(1); break;
case 'm': day = day.charAt(1)*30; break;
case 'y': day = day.charAt(1)*365; break;
}
arr[k].day = day;//新增属性记录对应的天数
}
}
//这个不需要了,而且得到的内容都是[object object]...,改下下面trigger下sel1的chang事件进行加载就行了
// for (var i = 0; i < o1.length; i++) {
// tmp += "<option value='" + o1[i].id + "'>" + o1[i].val + "</option>"
// }
// $("#sel2").append(tmp);
$("#sel1").change(function () {
$('#EntTime31').val('');
$('#nl3').val('');
$("#sel2").empty();
tmp = '<option>请选择</option> ';
for (var i = 0; i < o1.length; i++) {
if (o1[i].id == $("#sel1").val()) {
for (var j = 0; j < o1[i].val.length; j++) {
tmp += "<option name='" + o1[i].val[j].name + "' value='" + o1[i].val[j].day/*value改为天数,而不是id*/+ "'>" + o1[i].val[j].val + "</option>"
}
}
}
$("#sel2").append(tmp);
}).trigger('change');
解决方案二:
<!DOCTYPE html>
<html>
<head>
<script src="http://www.w3school.com.cn/jquery/jquery-1.11.1.min.js">
</script>
<script>
$(document).ready(function(){
$("p").click(function(){
alert("你选择的是 "+$("#selectDay").find("option:selected").text()+'--->'+ $("#selectDay").val()+"天");
});
});
</script>
</head>
<body>
<p>如果您点击我</p>
<p></p>
<select id="selectDay">
<option value='1'>一天</option>
<option value='7'>七天</option>
<option value='30'>一个月</option>
<option value='90'>三个月</option>
<option value='365'>一年</option>
</select>
</body>
</html>
解决方案三:
下拉框就那么几个选项,枚举出来,
固定天数,或根据时间判断天数两种不同情况
解决方案四:
下拉框,存的是【k:v】的形式,选中后,会触发一个onchang事件。得到你选中值的k,然后根据这个k,就知道去判断,转换。
解决方案五:
//下拉联动和文本框值
$(document).ready(function(){
//初始化存入日期
var d = new Date();
var s2 = d.getFullYear() + "-" + (d.getMonth()+1) + "-" + d.getDate() ;
$('#EntTime32').val(s2);
var o=[{'id':'1','val':'人民币'},{'id':'2','val':'美元'},{'id':'3','val':'英镑'},{'id':'4','val':'欧元'},{'id':'5','val':'日元'},{'id':'6','val':'港币'},{'id':'7','val':'加拿大元'},{'id':'8','val':'瑞士法郎'},{'id':'10','val':'新加坡元'}];
var o1=[ {'id':'1',val:[ {'name':'d1','id':'1','val':'一天通知'},{'name':'d7','id':'2','val':'七天通知'},{'name':'m1','id':'3','val':'一个月'},{'name':'m3','id':'4','val':'三个月'},{'name':'m6','id':'5','val':'六个月'},{'name':'y1','id':'6','val':'一年'},{'name':'y2','id':'7','val':'两年'},{'name':'y3','id':'63','val':'三年'},{'name':'y5','id':'8','val':'五年'}]},
{'id':'2',val:[ {'name':'d7','id':'9','val':'七天通知'},{'name':'m1','id':'10','val':'一个月'},{'name':'m3','id':'11','val':'三个月'},{'name':'m6','id':'12','val':'六个月'},{'name':'y1','id':'13','val':'一年'},{'name':'y2','id':'14','val':'两年'}]},
{'id':'3',val:[ {'name':'d7','id':'15','val':'七天通知'},{'name':'m1','id':'16','val':'一个月'},{'name':'m3','id':'17','val':'三个月'},{'name':'m6','id':'18','val':'六个月'},{'name':'y1','id':'19','val':'一年'},{'name':'y2','id':'20','val':'两年'}]},
{'id':'4',val:[ {'name':'d7','id':'21','val':'七天通知'},{'name':'m1','id':'22','val':'一个月'},{'name':'m3','id':'23','val':'三个月'},{'name':'m6','id':'24','val':'六个月'},{'name':'y1','id':'25','val':'一年'},{'name':'y2','id':'26','val':'两年'}]},
{'id':'5',val:[ {'name':'d7','id':'27','val':'七天通知'},{'name':'m1','id':'28','val':'一个月'},{'name':'m3','id':'29','val':'三个月'},{'name':'m6','id':'30','val':'六个月'},{'name':'y1','id':'31','val':'一年'},{'name':'y2','id':'32','val':'两年'}]},
{'id':'6',val:[ {'name':'d7','id':'33','val':'七天通知'},{'name':'m1','id':'34','val':'一个月'},{'name':'m3','id':'35','val':'三个月'},{'name':'m6','id':'36','val':'六个月'},{'name':'y1','id':'37','val':'一年'},{'name':'y2','id':'38','val':'两年'}]},
{'id':'7',val:[ {'name':'d7','id':'39','val':'七天通知'},{'name':'m1','id':'40','val':'一个月'},{'name':'m3','id':'41','val':'三个月'},{'name':'m6','id':'42','val':'六个月'},{'name':'y1','id':'43','val':'一年'},{'name':'y2','id':'44','val':'两年'}]},
{'id':'8',val:[ {'name':'d7','id':'45','val':'七天通知'},{'name':'m1','id':'46','val':'一个月'},{'name':'m3','id':'47','val':'三个月'},{'name':'m6','id':'48','val':'六个月'},{'name':'y1','id':'49','val':'一年'},{'name':'y2','id':'50','val':'两年'}]},
{'id':'9',val:[ {'name':'d7','id':'51','val':'七天通知'},{'name':'m1','id':'52','val':'一个月'},{'name':'m3','id':'53','val':'三个月'},{'name':'m6','id':'54','val':'六个月'},{'name':'y1','id':'55','val':'一年'},{'name':'y2','id':'56','val':'两年'}]},
{'id':'10',val:[ {'name':'d7','id':'57','val':'七天通知'},{'name':'m1','id':'58','val':'一个月'},{'name':'m3','id':'59','val':'三个月'},{'name':'m6','id':'60','val':'六个月'},{'name':'y1','id':'61','val':'一年'},{'name':'y2','id':'62','val':'两年'}]}
];
var tmp='';
for(var i=0;i<o.length;i++){
tmp+= "<option value='"+o[i].id +"'>"+o[i].val+"</option>"
}
$("#sel1").append(tmp);
tmp='';
for(var i=0;i<o1.length;i++){
tmp+= "<option value='"+o1[i].id +"'>"+o1[i].val+"</option>"
}
$("#sel2").append(tmp);
$("#sel1").change(function(){
$('#EntTime31').val('');
$('#nl3').val('');
$("#sel2").empty();
tmp='<option>请选择</option> ';
for(var i=0;i<o1.length;i++){
if(o1[i].id==$("#sel1").val()){
for(var j=0;j<o1[i].val.length;j++){
tmp+= "<option name='"+o1[i].val[j].name +"' value='"+o1[i].val[j].id +"'>"+o1[i].val[j].val+"</option>"
}
}
}
$("#sel2").append(tmp);
});
解决方案六:
html
<div class="portlet ui-widget ui-widget-content ui-helper-clearfix ui-corner-all">
<div class="portlet-header">存款利息计算</div>
<div class="portlet-content">
<h5><span>*</span>为必填项 </h5>
<hr class="hi">
<div class="table1">
<script>
function showHide(){
var t=document.getElementById("tex");
if(t.style.display==""||t.style.display=="block"){
t.style.display="none";}
else{
t.style.display="block";
}
}
function showHide1(){
var t=document.getElementById("tex1");
if(t.style.display==""||t.style.display=="block"){
t.style.display="none";}
else{
t.style.display="block";
}
}
function showHide2(){
var t=document.getElementById("tex2");
if(t.style.display==""||t.style.display=="block"){
t.style.display="none";}
else{
t.style.display="block";
}
}
function showHide3(){
var t=document.getElementById("tex3");
if(t.style.display==""||t.style.display=="block"){
t.style.display="none";}
else{
t.style.display="block";
}
}
</script>
<a onClick="showHide()">定义详情</a>
<div id="tex" style="display: none;">
活期储蓄存款:是一种没有存取日期约束,随时可取、随时可存,也没有存取金额限制的储蓄,采用积数计息法,即按实际天数每日累计账户余额,以累计积数乘以日利率计算利息。</br>
通知存款:是指不约定存期、支取时提前通知银行、约定支取日期和金额方能支取的储蓄,分为一天通知存款和七天通知存款。人民币通知存款最低起存、最低支取和最低留存金额均为50000元。通知存款利率高于活期存款利率,但未进行一天或七天预先通知提取的,按活期储蓄利率计息。</br>
整存整取:是指约定存期,整笔存入,到期一次支取本息的一种定期储蓄,50元起存,多存不限。</br>存期分三个月、六个月、一年、二年、三年和五年。整存整取提前支取的,按活期储蓄利率计息。
</div>
<a onClick="showHide1()">公式详情</a>
<div id="tex1" style="display: none;">
利息总额= 存入金额*存期*上浮</br>
本息合计 = 存入金额*存期*(1+上浮) </br>
利息税 = 存入金额*存期*上浮*0
</div>
<a onmousemove="showHide3()">定义详情</a>
<div id="tex3" style="display: none;">
活期储蓄存款:是一种没有存取日期约束,随时可取、随时可存,也没有存取金额限制的储蓄,采用积数计息法,即按实际天数每日累计账户余额,以累计积数乘以日利率计算利息。</br>
通知存款:是指不约定存期、支取时提前通知银行、约定支取日期和金额方能支取的储蓄,分为一天通知存款和七天通知存款。人民币通知存款最低起存、最低支取和最低留存金额均为50000元。通知存款利率高于活期存款利率,但未进行一天或七天预先通知提取的,按活期储蓄利率计息。</br>
整存整取:是指约定存期,整笔存入,到期一次支取本息的一种定期储蓄,50元起存,多存不限。</br>存期分三个月、六个月、一年、二年、三年和五年。整存整取提前支取的,按活期储蓄利率计息。
</div>
<form id="tj" class="tj" runat="server" name="form1">
<div class="input">
<table cellpadding="0" cellspacing="1" >
<tbody>
<tr>
<td><span id="sp1">*</span>存入金额 </td>
<td>
<input type="text" id="input"/>
<span style="color:#CCC;">最低存入金额为1000元</span>
</td>
</tr>
<tr>
<td><span id="sp1">*</span>币种 </td>
<td >
<select name="bz" id="sel1" onChange="getBz(this)" style="margin-left:20px;">
<option>请选择币种</option>
</select>
</td>
</tr>
<tr>
<td><span id="sp1">*</span>存期 </td>
<td >
<select name="city" style="margin-left:20px;" id="sel2">
<option>请选择存期</option>
</select>
</td>
</tr>
<tr>
<td><span id="sp1">*</span>年利率 </td>
<td >
<input type="text" id="nl3" style="width:100px; margin-left:20px;"/><span>%</span>
上浮区间<input type="text" id="nl3" style="width:100px; margin-left:20px;" value="0"/><span>%</span>
</td>
</tr>
<tr>
<td><span id="sp1">*</span>存入日期 </td>
<td>
<input type="text" class="date" id="EntTime32" name="EntTime32" onclick="return showCalendar('EntTime32', 'y-mm-dd');" value="" /><span>请点击</span>
</td>
</tr>
<tr>
<td><span id="sp1">*</span>提取日期 </td>
<td>
<input type="text" class="date" id="EntTime31" name="EntTime31" onclick="return showCalendar('EntTime31', 'y-mm-dd');" /><span>请点击</span>
</td>
</tr>
</tbody>
</table>
</div>
<div class="output">
<h4>计算结果</h4>
<hr class="hi"/>
<table cellpadding="0" cellspacing="1" >
<tbody>
<tr>
<td>利息总额 </td>
<td><input id="lj" type="text"/><input id="dw" /><td>
</tr>
<tr>
<td>本息合计 </td>
<td><input id="lj" type="text"/><input id="dw1" /></td>
</tr>
<tr>
<td>利息税 </td>
<td><input id="lj" type="text"/><input id="dw2" /></td>
<td><a onClick="showHide2()">明细详情</a></td>
</tr>
</tbody>
</table>
<div id="tex2" style="display:none;">
<table cellpadding="0" cellspacing="1" >
<tbody>
<dl style="padding-right:18px;">
<dt class="listeara" >
<div>转存期次</div>
<div>偿还本息(元) </div>
<div>偿还利息(元)</div>
<div>计算公式(元) </div>
<div>日期(元) </div>
</dt>
</dl>
<dl class="list" >
<label class="lab">
<p>fdgrrgergeedd,dmdmsdmf;sdkf;lksd;fksd;lfkd;slkfl;sdkf;lsdkf;ldskf;lsdkf;lsdkfl</p>
<p>fdgrrgergeedd,dmdmsdmf;sdkf;lksd;fksd;lfkd;slkfl;sdkf;lsdkf;ldskf;lsdkf;lsdkfl</p>
<p>fdgrrgergeedd,dmdmsdmf;sdkf;lksd;fksd;lfkd;slkfl;sdkf;lsdkf;ldskf;lsdkf;lsdkfl</p>
<p>fdgrrgergeedd,dmdmsdmf;sdkf;lksd;fksd;lfkd;slkfl;sdkf;lsdkf;ldskf;lsdkf;lsdkfl</p>
<p>fdgrrgergeedd,dmdmsdmf;sdkf;lksd;fksd;lfkd;slkfl;sdkf;lsdkf;ldskf;lsdkf;lsdkfl</p>
<p>fdgrrgergeedd,dmdmsdmf;sdkf;lksd;fksd;lfkd;slkfl;sdkf;lsdkf;ldskf;lsdkf;lsdkfl</p>
<p>fdgrrgergeedd,dmdmsdmf;sdkf;lksd;fksd;lfkd;slkfl;sdkf;lsdkf;ldskf;lsdkf;lsdkfl</p>
<p>fdgrrgergeedd,dmdmsdmf;sdkf;lksd;fksd;lfkd;slkfl;sdkf;lsdkf;ldskf;lsdkf;lsdkfl</p>
<p>fdgrrgergeedd,dmdmsdmf;sdkf;lksd;fksd;lfkd;slkfl;sdkf;lsdkf;ldskf;lsdkf;lsdkfl</p>
<p>fdgrrgergeedd,dmdmsdmf;sdkf;lksd;fksd;lfkd;slkfl;sdkf;lsdkf;ldskf;lsdkf;lsdkfl</p>
<p>fdgrrgergeedd,dmdmsdmf;sdkf;lksd;fksd;lfkd;slkfl;sdkf;lsdkf;ldskf;lsdkf;lsdkfl</p>
<p>fdgrrgergeedd,dmdmsdmf;sdkf;lksd;fksd;lfkd;slkfl;sdkf;lsdkf;ldskf;lsdkf;lsdkfl</p>
<p>fdgrrgergeedd,dmdmsdmf;sdkf;lksd;fksd;lfkd;slkfl;sdkf;lsdkf;ldskf;lsdkf;lsdkfl</p>
<p>fdgrrgergeedd,dmdmsdmf;sdkf;lksd;fksd;lfkd;slkfl;sdkf;lsdkf;ldskf;lsdkf;lsdkfl</p>
<p>fdgrrgergeedd,dmdmsdmf;sdkf;lksd;fksd;lfkd;slkfl;sdkf;lsdkf;ldskf;lsdkf;lsdkfl</p>
<p>fdgrrgergeedd,dmdmsdmf;sdkf;lksd;fksd;lfkd;slkfl;sdkf;lsdkf;ldskf;lsdkf;lsdkfl</p>
<p>fdgrrgergeedd,dmdmsdmf;sdkf;lksd;fksd;lfkd;slkfl;sdkf;lsdkf;ldskf;lsdkf;lsdkfl</p>
<p>fdgrrgergeedd,dmdmsdmf;sdkf;lksd;fksd;lfkd;slkfl;sdkf;lsdkf;ldskf;lsdkf;lsdkfl</p>
<p>fdgrrgergeedd,dmdmsdmf;sdkf;lksd;fksd;lfkd;slkfl;sdkf;lsdkf;ldskf;lsdkf;lsdkfl</p>
<p>fdgrrgergeedd,dmdmsdmf;sdkf;lksd;fksd;lfkd;slkfl;sdkf;lsdkf;ldskf;lsdkf;lsdkfl</p>
</label>
</dl>
</tbody>
</table>
</div>
</div>
</form>
</div>
</div>
</div>
js
//计算提取日期
function calcTime(){
$('#EntTime31').val('');
var d = new Date($('#EntTime32').val());
var val = $("#sel2").find("option:selected").attr("name");
var type = val.substring(0, 1);
var num = parseInt(val.substring(1,val.length));
if(type=="y"){
d.setFullYear(d.getFullYear()+num);
}else if(type=="m"){
d.setMonth(d.getMonth()+num);
}else{
d.setDate(d.getDate()+num);
}
var s1 = d.getFullYear() + "-" + (d.getMonth()+1) + "-" + d.getDate() ;
$('#EntTime31').val(s1);
}
//下拉联动和文本框值
$(document).ready(function(){
//初始化存入日期
var d = new Date();
var s2 = d.getFullYear() + "-" + (d.getMonth()+1) + "-" + d.getDate() ;
$('#EntTime32').val(s2);
var o=[{'id':'1','val':'人民币'},{'id':'2','val':'美元'},{'id':'3','val':'英镑'},{'id':'4','val':'欧元'},{'id':'5','val':'日元'},{'id':'6','val':'港币'},{'id':'7','val':'加拿大元'},{'id':'8','val':'瑞士法郎'},{'id':'10','val':'新加坡元'}];
var o1=[ {'id':'1',val:[ {'name':'d1','id':'1','val':'一天通知'},{'name':'d7','id':'2','val':'七天通知'},{'name':'m1','id':'3','val':'一个月'},{'name':'m3','id':'4','val':'三个月'},{'name':'m6','id':'5','val':'六个月'},{'name':'y1','id':'6','val':'一年'},{'name':'y2','id':'7','val':'两年'},{'name':'y3','id':'63','val':'三年'},{'name':'y5','id':'8','val':'五年'}]},
{'id':'2',val:[ {'name':'d7','id':'9','val':'七天通知'},{'name':'m1','id':'10','val':'一个月'},{'name':'m3','id':'11','val':'三个月'},{'name':'m6','id':'12','val':'六个月'},{'name':'y1','id':'13','val':'一年'},{'name':'y2','id':'14','val':'两年'}]},
{'id':'3',val:[ {'name':'d7','id':'15','val':'七天通知'},{'name':'m1','id':'16','val':'一个月'},{'name':'m3','id':'17','val':'三个月'},{'name':'m6','id':'18','val':'六个月'},{'name':'y1','id':'19','val':'一年'},{'name':'y2','id':'20','val':'两年'}]},
{'id':'4',val:[ {'name':'d7','id':'21','val':'七天通知'},{'name':'m1','id':'22','val':'一个月'},{'name':'m3','id':'23','val':'三个月'},{'name':'m6','id':'24','val':'六个月'},{'name':'y1','id':'25','val':'一年'},{'name':'y2','id':'26','val':'两年'}]},
{'id':'5',val:[ {'name':'d7','id':'27','val':'七天通知'},{'name':'m1','id':'28','val':'一个月'},{'name':'m3','id':'29','val':'三个月'},{'name':'m6','id':'30','val':'六个月'},{'name':'y1','id':'31','val':'一年'},{'name':'y2','id':'32','val':'两年'}]},
{'id':'6',val:[ {'name':'d7','id':'33','val':'七天通知'},{'name':'m1','id':'34','val':'一个月'},{'name':'m3','id':'35','val':'三个月'},{'name':'m6','id':'36','val':'六个月'},{'name':'y1','id':'37','val':'一年'},{'name':'y2','id':'38','val':'两年'}]},
{'id':'7',val:[ {'name':'d7','id':'39','val':'七天通知'},{'name':'m1','id':'40','val':'一个月'},{'name':'m3','id':'41','val':'三个月'},{'name':'m6','id':'42','val':'六个月'},{'name':'y1','id':'43','val':'一年'},{'name':'y2','id':'44','val':'两年'}]},
{'id':'8',val:[ {'name':'d7','id':'45','val':'七天通知'},{'name':'m1','id':'46','val':'一个月'},{'name':'m3','id':'47','val':'三个月'},{'name':'m6','id':'48','val':'六个月'},{'name':'y1','id':'49','val':'一年'},{'name':'y2','id':'50','val':'两年'}]},
{'id':'9',val:[ {'name':'d7','id':'51','val':'七天通知'},{'name':'m1','id':'52','val':'一个月'},{'name':'m3','id':'53','val':'三个月'},{'name':'m6','id':'54','val':'六个月'},{'name':'y1','id':'55','val':'一年'},{'name':'y2','id':'56','val':'两年'}]},
{'id':'10',val:[ {'name':'d7','id':'57','val':'七天通知'},{'name':'m1','id':'58','val':'一个月'},{'name':'m3','id':'59','val':'三个月'},{'name':'m6','id':'60','val':'六个月'},{'name':'y1','id':'61','val':'一年'},{'name':'y2','id':'62','val':'两年'}]}
];
var tmp='';
for(var i=0;i<o.length;i++){
tmp+= "<option value='"+o[i].id +"'>"+o[i].val+"</option>"
}
$("#sel1").append(tmp);
tmp='';
for(var i=0;i<o1.length;i++){
tmp+= "<option value='"+o1[i].id +"'>"+o1[i].val+"</option>"
}
$("#sel2").append(tmp);
$("#sel1").change(function(){
$('#EntTime31').val('');
$('#nl3').val('');
$("#sel2").empty();
tmp='<option>请选择</option> ';
for(var i=0;i<o1.length;i++){
if(o1[i].id==$("#sel1").val()){
for(var j=0;j<o1[i].val.length;j++){
tmp+= "<option name='"+o1[i].val[j].name +"' value='"+o1[i].val[j].id +"'>"+o1[i].val[j].val+"</option>"
}
}
}
$("#sel2").append(tmp);
});
$("#sel2").change(function(){
calcTime();
//人民币利息
if($("#sel2").val()=='1'){
$('#nl3').val('0.55');
}else if($("#sel2").val()=='2'){
$('#nl3').val('1.1');
}else if($("#sel2").val()=='3'){
$('#nl3').val('1.1');
}else if($("#sel2").val()=='4'){
$('#nl3').val('1.35');
}else if($("#sel2").val()=='5'){
$('#nl3').val('1.55');
}else if($("#sel2").val()=='6'){
$('#nl3').val('1.75');
}else if($("#sel2").val()=='7'){
$('#nl3').val('2.25');
}else if($("#sel2").val()=='63'){
$('#nl3').val('2.75');
}else if($("#sel2").val()=='8'){
$('#nl3').val('2.75');
//美元利息
}else if($("#sel2").val()=='9'){
$('#nl3').val('0.0500');
}else if($("#sel2").val()=='10'){
$('#nl3').val('0.2000');
}else if($("#sel2").val()=='11'){
$('#nl3').val('0.3000');
}else if($("#sel2").val()=='12'){
$('#nl3').val('0.5000');
}else if($("#sel2").val()=='13'){
$('#nl3').val('0.8000');
}else if($("#sel2").val()=='14'){
$('#nl3').val('0.8000');
//英镑利息
}else if($("#sel2").val()=='15'){
$('#nl3').val('0.0500');
}else if($("#sel2").val()=='16'){
$('#nl3').val('0.1000');
}else if($("#sel2").val()=='17'){
$('#nl3').val('0.1000');
}else if($("#sel2").val()=='18'){
$('#nl3').val('0.1000');
}else if($("#sel2").val()=='19'){
$('#nl3').val('0.1000');
}else if($("#sel2").val()=='20'){
$('#nl3').val('0.1000');
//欧元利息
}else if($("#sel2").val()=='21'){
$('#nl3').val('0.0005');
}else if($("#sel2").val()=='22'){
$('#nl3').val('0.0100');
}else if($("#sel2").val()=='23'){
$('#nl3').val('0.0100');
}else if($("#sel2").val()=='24'){
$('#nl3').val('0.0100');
}else if($("#sel2").val()=='25'){
$('#nl3').val('0.0100');
}else if($("#sel2").val()=='26'){
$('#nl3').val('0.0100');
//日元利息
}else if($("#sel2").val()=='27'){
$('#nl3').val('0.0005');
}else if($("#sel2").val()=='28'){
$('#nl3').val('0.0100');
}else if($("#sel2").val()=='29'){
$('#nl3').val('0.0100');
}else if($("#sel2").val()=='30'){
$('#nl3').val('0.0100');
}else if($("#sel2").val()=='31'){
$('#nl3').val('0.0100');
}else if($("#sel2").val()=='32'){
$('#nl3').val('0.0100');
//港币利息
}else if($("#sel2").val()=='33'){
$('#nl3').val('0.0100');
}else if($("#sel2").val()=='34'){
$('#nl3').val('0.1000');
}else if($("#sel2").val()=='35'){
$('#nl3').val('0.2500');
}else if($("#sel2").val()=='36'){
$('#nl3').val('0.5000');
}else if($("#sel2").val()=='37'){
$('#nl3').val('0.7000');
}else if($("#sel2").val()=='38'){
$('#nl3').val('0.7500');
//加拿大元利息
}else if($("#sel2").val()=='39'){
$('#nl3').val('0.0500');
}else if($("#sel2").val()=='40'){
$('#nl3').val('0.0500');
}else if($("#sel2").val()=='41'){
$('#nl3').val('0.0500');
}else if($("#sel2").val()=='42'){
$('#nl3').val('0.3000');
}else if($("#sel2").val()=='43'){
$('#nl3').val('0.4000');
}else if($("#sel2").val()=='44'){
$('#nl3').val('0.4000');
//瑞士法郎利息
}else if($("#sel2").val()=='45'){
$('#nl3').val('0.0001');
}else if($("#sel2").val()=='46'){
$('#nl3').val('0.0001');
}else if($("#sel2").val()=='47'){
$('#nl3').val('0.0001');
}else if($("#sel2").val()=='48'){
$('#nl3').val('0.0001');
}else if($("#sel2").val()=='49'){
$('#nl3').val('0.0001');
}else if($("#sel2").val()=='50'){
$('#nl3').val('0.0001');
//澳大利亚元利息
}else if($("#sel2").val()=='51'){
$('#nl3').val('0.2500');
}else if($("#sel2").val()=='52'){
$('#nl3').val('1.2000');
}else if($("#sel2").val()=='53'){
$('#nl3').val('1.3000');
}else if($("#sel2").val()=='54'){
$('#nl3').val('1.3000');
}else if($("#sel2").val()=='55'){
$('#nl3').val('1.5000');
}else if($("#sel2").val()=='56'){
$('#nl3').val('1.5000');
//新加坡元利息
}else if($("#sel2").val()=='57'){
$('#nl3').val('0.0005');
}else if($("#sel2").val()=='58'){
$('#nl3').val('0.0100');
}else if($("#sel2").val()=='59'){
$('#nl3').val('0.0100');
}else if($("#sel2").val()=='60'){
$('#nl3').val('0.0100');
}else if($("#sel2").val()=='61'){
$('#nl3').val('0.0100');
}else if($("#sel2").val()=='62'){
$('#nl3').val('0.0100');
}else{
$('#nl3').val('');
}
});
});
解决方案七:
大哥,你上面,代码那么多那么乱。我都不知道哪里对那里。
解决方案八:
option的值自己改,这么简单的问题
时间: 2024-12-28 01:02:00