|
藍森林 http://www.lslnet.com 2006年8月25日 8:28
菜鳥問題(幫忙看看代碼什麼意思)
//The TD on losing focus hides the Calendar within it
//But if the lost focus occured due to the button click
//(indicated by over==1)the Cal won't get invisible sine
//the button click will be called immediately after this onblur event
//which will again cause it to be displayed...The only thing that we can
//do is somehow disable the click for once..This is
//done by assigning 'donothing' fn to it..which doesn't do anything
//with the calendar..it simply restores the eventhandler for button onclick
//so everything is back to normal.
output.WriteLine("function "+onblurfn);
output.WriteLine("{");
output.WriteLine("document.all('"+tdID+"').childNodes(0).style.display='none';");
output.WriteLine("if (over==1)");
output.WriteLine("document.all('"+btnID+"').onclick="+uniqueID+"donothing;");
output.WriteLine("}");
//As explained below this function simply restores the onclick handler
output.WriteLine("function "+donothing);
output.WriteLine("{");
output.WriteLine("document.all('"+btnID+"').onclick="+uniqueID+"toggleCal;");
utput.WriteLine("}");
toggleCal函數哪裡去了!!!!!!!!是系統的嗎!! |
|