jsp中 input type="text" 的 onchange事件为何不好用,无法调用函数a呢
<scripttype="text/javascript">functiona(v){varnext=v.substring(0,4);varnextto=v.subst...
<script type="text/javascript">
function a(v){
var next=v.substring(0,4);
var nextto=v.substring(4,10);
year1=parseInt(next);
year2=year1+3;
document.getElementById("fpsj").value=year2+nextto;
}
</script>
<input type="text" name="pssj" onclick="setday(this)" class="input" size="14" onchange="a(this.value);">
<input type="text" name="fpsj" onclick="setday(this)" class="input" size="14" > 展开
function a(v){
var next=v.substring(0,4);
var nextto=v.substring(4,10);
year1=parseInt(next);
year2=year1+3;
document.getElementById("fpsj").value=year2+nextto;
}
</script>
<input type="text" name="pssj" onclick="setday(this)" class="input" size="14" onchange="a(this.value);">
<input type="text" name="fpsj" onclick="setday(this)" class="input" size="14" > 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询