求助 请完成如下HTML代码

html-css012

求助 请完成如下HTML代码,第1张

应该是这样的吧。。

<form action="post.asp" method="post">

    <table>

        <tr>

            <td>标题</td>

            <td><input type="text" name="title" style="width:20px"></td>

        </tr>

        <tr>

            <td>作者</td>

            <td><input type="text" name="author" style="width:10px"></td>

        </tr>

        <tr>

            <td>留言内容</td>

            <td>

                <textarea name="content" cols="40" rows="5"></textarea>

            </td>

        </tr>

        <tr>

            <td></td>

            <td>

                <input type="submit" value="提交" />

                <input type="reset" value="清空" />

            </td>

        </tr>

    </table>

</form>

HTML 代码留言板 一个超简陋的留言版 免费留言板 //评论内容不能保存 因为涉及到数据库

<script>

function Ok_OnClick(event)

{

if(document.getElementsByName("textName")[0].value == ""){

alert("请输入内容")

return

}//getElementById

var table

var tableList = document.getElementsByTagName("TABLE")

for(var i = 0 i <tableList.length i++) {

if(tableList[i].name == "tableName") {

table = tableList[i]

break

}

}

var value = document.getElementsByName("textName")[0].value

var index = table.rows.length

table.insertRow(index)

table.rows(index).insertCell(0)

table.rows(index).cells(0).innerText = value

document.getElementsByName("textName")[0].value = ""

}

</script>

<HTML>

<HEAD>

<META http-equiv="Content-Type" content="text/htmlcharset=gb2312">

<TITLE>留言版</TITLE>

<STYLE>

td{width:20%height:20pxborder-bottom:1px solid blackborder-right:1px solid blackcursor:default}

div{font-size:13px}

th{height:20pxfont-size:12pxfont-weight:normalborder-bottom:2px solid blackbackground-color:#CCCCCC}

table{border:1px solid blackfont-size:13px}

</STYLE>

</HEAD>

<BODY oncontextmenu="return false"">

<TABLE name="tableName" width="70%" align="center" cellpadding="0" cellspacing="0">

<TR>

<TH colspan="4" style="">留言版</TH>

</TR>

<TR>

<TD>呵呵,一个超简陋的留言版 ^_^</TD>

</TR>

</TABLE>

<BR>

<div align="center">

<textarea rows="2" name="textName" id="textId" cols="20"

style="width: 70%clip: rect(0pt, 47pt, 18pt, 0pt)font-family: 宋体font-size: 10ptfont-weight: normalfont-style: normaltext-align: leftvertical-align: middletext-indent: 0color: #000000background-attachment: fixedbackground-color: #EEEEEEborder: 1px solid #0xf8f8f8">

</textarea>

</div>

<BR>

<div align="center">

<input type="button" value="提交" onclick="return Ok_OnClick(window.event)"

style="align:center width:60 height: 21clip: rect(0pt, 47pt, 18pt, 0pt)font-family: 宋体font-size: 10ptfont-weight: normalfont-style: normalcursor: handtext-align: centervertical-align: middletext-indent: 0color: #000000background-attachment: fixedbackground-color: #d8d8d8border: 1px solid #59b4f7">

<!--position: absoluteleft: 342top: 184-->

</div>

</BODY>

</HTML>