| 发表于:2007-01-14 01:26:55 楼主 |
请教 <script> function fnhide(otohide){ window.settimeout( "fnhide2( " + otohide.id + ") ", 3000); } function fnhide2(sid){ var o = eval(sid); o.style.display= "none "; } </script> <input type=button value= "count down " id= "ohidebutton " onclick= "fnhide(this) "> 这个fnhide2( " + otohide.id + ")为什么不能直接写成fnhide2( otohide.id )? 下面是另一个问题 <script> var g_otohide = null; function fnhide(otohide){ g_otohide = otohide; window.settimeout(fnhide2, 3000); } function fnhide2(sid){ if (g_otohide) { g_otohide.style.display= "none "; } } </script> <input type=button value= "now you see me ... " id= "ohidebutton " onclick= "fnhide(this) "> 这个是调用的id的?不明白,我看是调用的 <input> 这个标签的,可是说明说是调用了id这个指针. |
|
|
|
|