| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1566 人关注过本帖
标题:[求助]怎么实现ASP在HTML中调用
只看楼主 加入收藏
菜鸟是我拉
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2007-5-4
收藏
 问题点数:0 回复次数:4 
[求助]怎么实现ASP在HTML中调用

明天给一个公司交作品,是这样的.他们要求做一个新闻网站,可以用他人的后台,然后前台必须自己独立完成,其他倒没什么要求,但有个文章签收回馈系统,很麻烦,5.1前期我一个不错的给我简单的做了一个,可是他们要求在前台必须有一个板块是文章签收de.但我ASP只会点皮毛,怎么个调用,却难死我了.因为这个签收程序和网站后台调用程序是分离的两个系统,不一样的.我前台使用的是.HTML的,我试过直接插入框架,但是显示的是整页,但无论怎么试验都无法调用...现在还联系不到那个哥们...今天晚上我打算通宵研究,到了现在实在一点头绪也没有.就是这个单独的签到程序不知道怎么在前台静态网页中怎么调用...

真诚求助各位达人,加偶QQ远程给看下.可能我说的复杂,但其实很简单的,只是一个前台调用

而已. 只怪自己学浅...偶QQ:2996744 加QQ答案:宏伟网吧

如果达人要留言的话,最好说的通俗易懂点...偶是菜鸟``

[此贴子已经被作者于2007-5-4 22:19:24编辑过]

搜索更多相关主题的帖子: ASP HTML 
2007-05-04 22:11
菜鸟是我拉
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2007-5-4
收藏
得分:0 

下面是文章显示的代码:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>信息列表</title>
<!--#include file="css.css"-->
<!--#include file="conn.asp"-->
</head>


<body topmargin="1">
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="90" class="unnamed18">
<div align="center"><!--#include file="top.asp"--></div></td>
</tr>
</table>

<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
<tr><td bgcolor="#98a5d0" align=right>
<% anguage="vbscript"
dim conn
dim connstr
dim totalPut
dim CurrentPage
dim TotalPages
dim i,j
dim sql
dim rs
on error resume next
'打开数据库
set rs=server.createobject("adodb.recordset")
'定义每页文章显示数
const MaxPerPage=10
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
sql="select * from news order by 置顶 desc,id desc"
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,3,2
if rs.eof and rs.bof then
response.write "<p align='center'> 还 没 有 任 何 文 章</p>"
else
'数据库中文章数totalput
totalPut=rs.recordcount
if currentpage<1 then
currentpage=1
end if
'统计总页数currentpage
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then

showContent
showpage totalput,MaxPerPage,"qtlist.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark

showContent
showpage totalput,MaxPerPage,"qtlist.asp"
else
currentPage=1

showContent
showpage totalput,MaxPerPage,"qtlist.asp"
end if
end if
end if

sub showContent

'选择显示数据库内容

%>
<table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
<tr><td width="594">&nbsp;
</td>
<td width="106" align="center"> </td>
</tr>
</table>

<table width="700" height="20" border="0" align="center" cellspacing="1" class="unnamed12">
<tr class="unnamed14" bgcolor="#FF9966" height="30">
<td width="374" > <div align="center">内     容</div></td>
<td width="77" > <div align="center">发文单位</div></td>
<td width="127" > <div align="center">发文时间</div></td>
<td width="64" > <div align="center">签收状态</div></td>
<td width="58" > <div align="center">签收情况</div></td>

</tr>
<% dim i
i=0
j=0

do while not rs.eof


%>
<tr class="unnamed12" bgcolor="<%if j mod 2=0 then %>#ffcc99<%else%>#ffffff<%end if%>">
<td width="374" height="30" > <a href=qtdisp.asp?disp_id=<%=rs("id")%> target="_blank"><%=left(rs("标题"),20)%></a> <%if rs("附件")<>" " then%> <img src="images/fujian.gif" align="absbottom"> <%end if%></td>
<td width="77" height="30"> <div align="center"><%=rs("发文者")%></div></td>
<td width="127" height="30"> <div align="center"><%=rs("发文日期")%> <%=rs("发文时间")%></div></td>
<td width="64" height="30"> <div align="center">
<%if rs("签收状态")=true then%>
<font color="#FF0000">签收完毕</font>
<%else%>
<font color="#0000FF">签收中</font>
<%end if%>
</div></td>
<td width="58" height="30"> <div align="center"><a href="qtlooker.asp?look_id=<%=rs("id")%>" target="_blank">签收详情</a></div></td>

</tr>


<%
'当显示记录大于maxperpage时结束这页
i=i+1
j=j+1
if i>=MaxPerPage then exit do
rs.movenext

loop

%>
</table>
<%
end sub

function showpage(totalnumber,maxperpage,filename)
'求出当总共的页数
dim n
if totalnumber mod maxperpage=0 then
n= totalnumber \ maxperpage
else
n= totalnumber \ maxperpage+1
end if
response.write "<form method=Post action="&filename&">"
response.write "<p align='center' > <font color='#000080' class='unnamed12'>>>分页</font> "
'显示页数链接的条件
if CurrentPage<2 then
response.write "<font color='#000080' class='unnamed12'>首页 上一页</font> "
else
response.write "<a href="&filename&"?page=1& class='unnamed12'>首页</a> "
response.write "<a href="&filename&"?page="&CurrentPage-1&" class='unnamed12'>上一页</a> "
end if
if n-currentpage<1 then
response.write "<font color='#000080' class='unnamed12'>下一页 尾页</font>"
else
response.write "<a href="&filename&"?page="&(CurrentPage+1)
response.write "><font color='#000080' class='unnamed12'>下一页</font></a> <a href="&filename&"?page="&n&"><font color='#000080' class='unnamed12'>尾页</font></a>"
end if
response.write "<font color='#000080' class='unnamed12'> 页次:</font><strong><font color=red class='unnamed12'>"&CurrentPage&"</font><font color='#000080'class='unnamed12'>/"&n&"</strong>页</font>"
response.write "<font color='#000080' class='unnamed12'> 共<b>"&totalnumber&"</b>篇文章 <b>"&maxperpage&"</b>篇文章/页</font>"
response.write " <font color='#000080' class='unnamed12'>转到:</font><input type='text' name='page' size=4 maxlength=10 class='unnamed12't value="&tpage&">"
response.write "<input class='unnamed12' type='submit' value=' Goto ' name='cndok'>"
response.write "  <a href='admin.asp' target='_blank'><font color=red class='unnamed12'>管理登陆</font></a></span></p></form>"
end function
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
</td>
</tr>
</table>

<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><!--#include file="bottom.asp"--></td>
</tr>
</table>
</body>
</html>

2007-05-04 22:12
谁与争疯
Rank: 16Rank: 16Rank: 16Rank: 16
来 自:海南省
等 级:版主
威 望:191
帖 子:15071
专家分:17513
注 册:2007-4-22
收藏
得分:0 
以下是引用菜鸟是我拉在2007-5-4 22:11:31的发言:

我来这个论坛好多时间了,只不过工作忙,没怎么发过贴.大家谅解下..

你的注册时间,怎么是今天的?兄弟,要帮忙就说声,做人要厚道,要诚实啊!!
凡是骗子需要帮忙的,我坚决不帮!
凡是骗子不需要帮的,我坚决死帮!


论坛是我家灌水靠大家
2007-05-04 22:14
菜鸟是我拉
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2007-5-4
收藏
得分:0 
大哥我错了...我也是急用才这样...
下不违例...今天一天找了好几个论坛,都不管不问..
偶心是死了一半...
2007-05-04 22:19
谁与争疯
Rank: 16Rank: 16Rank: 16Rank: 16
来 自:海南省
等 级:版主
威 望:191
帖 子:15071
专家分:17513
注 册:2007-4-22
收藏
得分:0 
你慢慢打在这里说明,要怎么调用?
是不是在HTML的静态页面里加入ASP就行了?

论坛是我家灌水靠大家
2007-05-04 22:43
快速回复:[求助]怎么实现ASP在HTML中调用
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.022284 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved