本文實例講述了JS動態顯示表格上下frame的方法。分享給大家供大家參考。具體如下:
<!DOCTYPE html><html><head><script>function aboveFrames(){document.getElementById('myTable').frame="above";}function belowFrames(){document.getElementById('myTable').frame="below";}</script></head><body><table id="myTable"><tr><td>100</td><td>200</td></tr><tr><td>300</td><td>400</td></tr></table><br><input type="button" onclick="aboveFrames()"value="Show above frames"><input type="button" onclick="belowFrames()"value="Show below frames"></body></html>
希望本文所述對大家的javascript程序設計有所幫助。
新聞熱點
疑難解答