function OnSubmit()
{
if(Form1.txtWithYouGaku2.disabled)Form1.txtWithYouGaku2.disabled=false;
Form1.txtWithYouGaku2.value=Form1.valWithYouGaku2.value;
if(Form1.txtWithYouGaku3.disabled)Form1.txtWithYouGaku3.disabled=false;
Form1.txtWithYouGaku3.value=Form1.valWithYouGaku3.value;
if(Form1.txtWithYouGaku4.disabled)Form1.txtWithYouGaku4.disabled=false;
Form1.txtWithYouGaku4.value=Form1.valWithYouGaku4.value;
}
function SetTextBoxDisabled(controlName,bol)
{
document.getElementById(controlName).disabled=true;
document.getElementById(controlName).style.borderColor='silver';
document.getElementById(controlName).style.borderStyle='solid';
document.getElementById(controlName).style.borderWidth='1px';
document.getElementById(controlName).style.color='silver';
if(bol)
{
document.getElementById(controlName).value="";
}
}
function Page5()
{
alert("Page5");
var a=document.Form1.cmbTsukinKinmuDayCount.value;
var b=document.Form1.txtKatamichiGaku2.value;
var c=document.Form1.cmbKoutsuKikanType2.value;
var x=a*b*2*(10/11);
if(b==""||a==""){x="NaN";}
SetHanEnabled("cmbKoutsuKikanType2",c);
if(c=="11")
{
if(document.Form1.chkNoritsugiken2.checked)
{
arrWithYouGaku[2]=Form1.valWithYouGaku2.value;
SetTextBoxDisabled("txtWithYouGaku2",false);
}
else
{
SetTextBoxEnabled("txtWithYouGaku2","66px","19px");
x="NaN";
}
}
if(c!=""&&c!="11"&&c!=""&&c!="00"&&c!="08"&&c!="09"&&c!="10"&&c!="12"&&c!="13")
{
arrWithYouGaku[2]=Form1.valWithYouGaku2.value;
SetTextBoxDisabled("txtWithYouGaku2",false);
}
if(c==""||c=="00"||c=="08"||c=="09"||c=="10"||c=="12"||c=="13")
{
arrWithYouGaku[2]=Form1.valWithYouGaku2.value;
SetTextBoxDisabled("txtWithYouGaku2",false);
x="NaN";
}
if(x!="NaN")
{
var z=Math.floor(x);
if(isNaN(z)||z<0)
{
document.Form1.txtWithYouGaku2.value=" ";
FinalProcess(2,"");
}
else
{
document.Form1.txtWithYouGaku2.value=z;
FinalProcess(2,z);
}
}
else
{
if(!flgLoad)
{
document.Form1.txtWithYouGaku2.value="";
}
FinalProcess(2,document.Form1.txtWithYouGaku2.value);
}
}
太多了,先粘了点关键的
{
if(Form1.txtWithYouGaku2.disabled)Form1.txtWithYouGaku2.disabled=false;
Form1.txtWithYouGaku2.value=Form1.valWithYouGaku2.value;
if(Form1.txtWithYouGaku3.disabled)Form1.txtWithYouGaku3.disabled=false;
Form1.txtWithYouGaku3.value=Form1.valWithYouGaku3.value;
if(Form1.txtWithYouGaku4.disabled)Form1.txtWithYouGaku4.disabled=false;
Form1.txtWithYouGaku4.value=Form1.valWithYouGaku4.value;
}
function SetTextBoxDisabled(controlName,bol)
{
document.getElementById(controlName).disabled=true;
document.getElementById(controlName).style.borderColor='silver';
document.getElementById(controlName).style.borderStyle='solid';
document.getElementById(controlName).style.borderWidth='1px';
document.getElementById(controlName).style.color='silver';
if(bol)
{
document.getElementById(controlName).value="";
}
}
function Page5()
{
alert("Page5");
var a=document.Form1.cmbTsukinKinmuDayCount.value;
var b=document.Form1.txtKatamichiGaku2.value;
var c=document.Form1.cmbKoutsuKikanType2.value;
var x=a*b*2*(10/11);
if(b==""||a==""){x="NaN";}
SetHanEnabled("cmbKoutsuKikanType2",c);
if(c=="11")
{
if(document.Form1.chkNoritsugiken2.checked)
{
arrWithYouGaku[2]=Form1.valWithYouGaku2.value;
SetTextBoxDisabled("txtWithYouGaku2",false);
}
else
{
SetTextBoxEnabled("txtWithYouGaku2","66px","19px");
x="NaN";
}
}
if(c!=""&&c!="11"&&c!=""&&c!="00"&&c!="08"&&c!="09"&&c!="10"&&c!="12"&&c!="13")
{
arrWithYouGaku[2]=Form1.valWithYouGaku2.value;
SetTextBoxDisabled("txtWithYouGaku2",false);
}
if(c==""||c=="00"||c=="08"||c=="09"||c=="10"||c=="12"||c=="13")
{
arrWithYouGaku[2]=Form1.valWithYouGaku2.value;
SetTextBoxDisabled("txtWithYouGaku2",false);
x="NaN";
}
if(x!="NaN")
{
var z=Math.floor(x);
if(isNaN(z)||z<0)
{
document.Form1.txtWithYouGaku2.value=" ";
FinalProcess(2,"");
}
else
{
document.Form1.txtWithYouGaku2.value=z;
FinalProcess(2,z);
}
}
else
{
if(!flgLoad)
{
document.Form1.txtWithYouGaku2.value="";
}
FinalProcess(2,document.Form1.txtWithYouGaku2.value);
}
}
太多了,先粘了点关键的
这个方法在html里面可以,但是IE5.01下Asp.net就不行了
对应方法我还在查