?? add_comment2.asp
字號:
<%@ Language=VBScript %>
<!--#include file ="identify.asp"-->
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK rel="stylesheet" type="text/css" href="xcss.css">
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<script language="javascript">
function check()
{
if (form1.title.value=="")
{
alert ("請?zhí)顚憳?biāo)題!");
return false;
}
return true;
}
function MyGrade(str) {
str = new Array(5);
str[0] = "不會(huì)吧,居然是這么爛?";
str[1] = "原來這本書不合你的口味啊";
str[2] = "平淡無奇,就這樣吧?";
str[3] = "看來你很喜歡這本書哦";
str[4] = "這本書有這么好嗎?";
for(i=0;i<5;i++) {
if (document.form2.grade[i].checked==true) {
if(confirm(str[i])) {
form2.submit();
}
}
}
}
</script>
</HEAD>
<BODY background=images/zapsmbknd.gif>
<%
b_bookid = Request.QueryString("bookid")
if len(b_bookid)=0 then
Response.Write "此書不存在!"
Response.End
end if
set conn = server.CreateObject("adodb.connection")
conn.Open Application("dsn")
sql = "select bookid,name,author from BookDetail where bookid=" & b_bookid
set rs = server.CreateObject("adodb.recordset")
rs.Open sql,conn
if rs.EOF then
rs.Close
set rs = nothing
conn.Close
set conn = nothing
Response.Write "找不到您要的文件!"
Response.End
end if
b_name = rs("name")
author = rs("author")
rs.Close
set rs = nothing
conn.Close
set conn = nothing
%>
<p><b>書名:</b><%=b_name%></p>
<p><b>作者:</b><%=author%></p>
<FORM action="grade_submit.asp" method=POST id=form2 name=form2>
<hr>
<h3>我要給你打打分</h3>
<input name="grade" onclick="Javascript:MyGrade();" type="radio" value="1">1
<input name="grade" onclick="Javascript:MyGrade();" type="radio" value="2">2
<input CHECKED name="grade" onclick="Javascript:MyGrade();" type="radio" value="3">3
<input name="grade" onclick="Javascript:MyGrade();" type="radio" value="4">4
<input name="grade" onclick="Javascript:MyGrade();" type="radio" value="5">5
<input type="hidden" name="username" value="<%=session("username")%>">
<input type="hidden" name="bookid" value="<%=b_bookid%>">
</FORM>
<hr>
<form action="add_cmaction0.asp" method="POST" id="form1" name="form1" onsubmit="return check();">
<input type=hidden name=book_title value="<%=b_name%>">
<p><h3>我要發(fā)表看法:</h3>
<b>選一個(gè)表情圖標(biāo):</b>
<img src="images/p1.gif" WIDTH="15" HEIGHT="15"><input type="radio" name="imgname" value="p1" checked>
<img src="images/p2.gif" WIDTH="15" HEIGHT="15"><input type="radio" name="imgname" value="p2">
<img src="images/p3.gif" WIDTH="15" HEIGHT="15"><input type="radio" name="imgname" value="p3">
<img src="images/p4.gif" WIDTH="15" HEIGHT="15"><input type="radio" name="imgname" value="p4">
<img src="images/p5.gif" WIDTH="15" HEIGHT="15"><input type="radio" name="imgname" value="p5">
<img src="images/p6.gif" WIDTH="15" HEIGHT="15"><input type="radio" name="imgname" value="p6">
<img src="images/p7.gif" WIDTH="15" HEIGHT="15"><input type="radio" name="imgname" value="p7">
<img src="images/p8.gif" WIDTH="15" HEIGHT="15"><input type="radio" name="imgname" value="p8">
<br>
<b>評論標(biāo)題:</b><input type="text" name="title" size="40"></p>
<p valign="top"><b>您的評論:</b><br>
<input type="hidden" name="username" value="<%=session("username")%>">
<input type="hidden" name="bookid" value="<%=b_bookid%>">
<textarea id="detail" name="detail" style="HEIGHT: 120px; WIDTH: 500px" valign="top" wrap="hard"></textarea></p>
<table WIDTH="550" BORDER="0" CELLSPACING="1" CELLPADDING="1">
<tr>
<td align="center"><input type="submit" value="添加" id="submit1" name="submit1"> <input type="button" value="取消" onclick="javascript:window.close();" id="button1" name="button1"></td>
</tr>
</table>
</form>
</body>
</html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -