[ js ] 如何js表格寫入textarea裡面

看板Ajax作者 (平凡就好)時間17年前 (2008/12/01 19:53), 編輯推噓1(101)
留言2則, 2人參與, 最新討論串1/1
我的意思 例如我寫一個function 要寫出一個表格在我指定的textarea裡面 舉一個例子 function displayCalendar(month, year) { document.write("<TABLE BORDER=2 bordercolor=#8080FF CELLSPACING=2 CELLPADDING=2>"); document.write("<TR ALIGN=center>"); document.write("<TD><FONT SIZE=2 face=arial COLOR=\"#FF0000\">星期日 </FONT>"); document.write("<TD><FONT SIZE=2 face=arial color=000000>星期一</FONT>"); document.write("<TD><FONT SIZE=2 face=arial color=000000>星期二</FONT>"); document.write("<TD><FONT SIZE=2 face=arial color=000000>星期三</FONT>"); document.write("<TD><FONT SIZE=2 face=arial color=000000>星期四</FONT>"); document.write("<TD><FONT SIZE=2 face=arial color=000000>星期五</FONT>"); document.write("<TD><FONT SIZE=2 COLOR=\"#FF0000\">星期六</FONT>"); document.write("</TABLE>"); } <body> <textarea FONT="Courier" NAME="calPage" WRAP=no ROWS=8 COLS=22> </textarea> </body> 請問在document那邊要什麼寫 感謝各位大大 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 218.174.41.40

12/01 21:03, , 1F
觀念已經嚴重錯誤 = ="
12/01 21:03, 1F

12/01 22:23, , 2F
table 不能放textarea裡面
12/01 22:23, 2F
文章代碼(AID): #19Cz0-Jl (Ajax)
文章代碼(AID): #19Cz0-Jl (Ajax)