<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>
简单易懂的就选php(因为我就懂这个哈哈~),用php的话你需要网上下载一个wamp,安装,一般安装在随便一个盘的根目录下,如D:/这样。比如你装在D盘,那么在D盘的根目录会生成一个wamp文件夹,这个文件夹里面有个www文件夹,www里面就是你要写代码放的地方,然后你打开浏览器,输入网址:localhost或者127.0.0.1,出现php界面应该就是安装成功了。你注意电脑屏幕右下角有个绿色的W标志,就是成功啦~接下来就是编写php语言用来连接数据库啦
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)