这一讲说下评论代码的制作。这个有点麻烦,需要判断用户是否登陆,而我们在页面的头部,已经有一个会员登陆了,这两个有可能会冲突。
找到如下代码:
- <SCRIPT>
- function CheckPl(obj)
- {
- if(obj.saytext.value=="")
- {
- alert("您没什么话要说吗?");
- obj.saytext.focus();
- return false;
- }
- return true;
- }
- </SCRIPT>
- <FORM id=saypl onSubmit="return CheckPl(document.saypl)" method=post name=saypl
- action=/e/enews/index.php>
- <DIV class=comment>
- <DIV class=com_t>
- <H3>发表评论</H3><SPAN class=com2><A
- href="http://www.quanji.cn/e/pl?classid=9&id=6153">共有<SPAN class=com3>
- <SCRIPT type=text/javascript
- src="布拉德利:不值得与可汗这种没价值的人比赛_国际拳坛_拳击在线%20-%20QuanJi_Cn%20%20致力于打造最大最全拳击门户!_files/ViewClick.htm"></SCRIPT>
- </SPAN>条评论</A></SPAN> </DIV>
- <DIV class=com_c>
- <TABLE border=0 cellSpacing=2 cellPadding=0 width="100%">
- <TBODY>
- <TR>
- <TD>
- <SCRIPT
- src="布拉德利:不值得与可汗这种没价值的人比赛_国际拳坛_拳击在线%20-%20QuanJi_Cn%20%20致力于打造最大最全拳击门户!_files/more.htm"></SCRIPT>
- </TD></TR></TBODY></TABLE>
- <TABLE class=com_c border=0 cellSpacing=2 cellPadding=0 width="100%">
- <TBODY>
- <TR>
- <TD width="56%" align=left>用户名: <INPUT id=username class=inputText size=16
- type=text name=username></TD>
- <TD width="44%" align=left>密码: <INPUT id=password class=inputText size=16
- type=password name=password></TD></TR>
- <TR>
- <TD align=left>验证码: <INPUT class=inputText size=10 type=text name=key>
- <IMG align=absMiddle
- src="布拉德利:不值得与可汗这种没价值的人比赛_国际拳坛_拳击在线%20-%20QuanJi_Cn%20%20致力于打造最大最全拳击门户!_files/ShowKey.jpg">
- </TD>
- <TD align=left><INPUT id=nomember value=1 CHECKED type=checkbox
- name=nomember> 匿名发表</TD></TR></TBODY></TABLE><TEXTAREA id=saytext rows=4 name=saytext></TEXTAREA>
- <INPUT
- src="布拉德利:不值得与可汗这种没价值的人比赛_国际拳坛_拳击在线%20-%20QuanJi_Cn%20%20致力于打造最大最全拳击门户!_files/sub_tjly.gif"
- type=image name=imageField> <INPUT idid=id value=6153 type=hidden name=id> <INPUT
- id=classid value=9 type=hidden name=classid> <INPUT id=enews value=AddPl
- type=hidden name=enews> <INPUT id=repid value=0 type=hidden name=repid> <INPUT
- value=/news/1/6153.html type=hidden name=ecmsfrom>
- <DIV class=clear></DIV></DIV></DIV></FORM>