[ js ] 如何js表格寫入textarea裡面
我的意思
例如我寫一個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
12/01 22:23, 2F
Ajax 近期熱門文章
PTT數位生活區 即時熱門文章