1、请问一下,网页制作的主页和分页是什么意思啊?怎么做?
主页就是 打开网址显示的第一页,分页就是其他深入点击 显示的页面
2、网页制作-分页
把下列code保存成p_index.asp 100%工作
<%@LANGUAGE="VBScript" codepage="936"%>
<!--#include file="ubbcode.asp"-->
<!--#include file="conn.asp"-->
<html>
<head>
<meta http-equiv="Page-Exit" content="revealTrans(Duration=1.0,Transition=12)">
<script language=javascript>
var currentpos,timer;
function initialize()
{
timer=setInterval("scrollwindow()",90);
}
function sc(){
clearInterval(timer);
}
function scrollwindow()
{
currentpos=document.body.scrollTop;
window.scroll(0,++currentpos);
if (currentpos != document.body.scrollTop)
sc();
}
document.onmousedown=sc
document.ondblclick=initialize
</script>
<link href="skin_1.css" rel="stylesheet" type="text/css">
<title>DenReakun</title>
<link href="style.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#FDFDFD" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<%
'**********************************************************
'**********************************************************
dim rs
dim sql
msg_per_page = 2
set rs = server.createobject("adodb.recordset")
sql = "select * from news where user = 'Procts' order by id desc"
rs.cursorlocation = 3
rs.pagesize = msg_per_page
rs.open sql,conn,0,1
if err.number<>0 then
response.write "Database Error:" & err.description
err.clear
else
if not (rs.eof and rs.bof) then
totalrec = RS.RecordCount
if rs.recordcount mod msg_per_page = 0 then
n = rs.recordcount\msg_per_page
else
n = rs.recordcount\msg_per_page+1
end if
currentpage = request("page")
If currentpage <> "" then
currentpage = cint(currentpage)
if currentpage < 1 then
currentpage = 1
end if
if err.number <> 0 then
err.clear
currentpage = 1
end if
else
currentpage = 1
End if
if currentpage*msg_per_page > totalrec and not((currentpage-1)*msg_per_page < totalrec)then
currentPage=1
end if
rs.absolutepage = currentpage 'absolutepage:
rowcount = rs.pagesize 'pagesize:
dim i
dim k
%>
<table width="306" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="10"></td>
</tr>
</table>
<%do while not rs.eof and rowcount > 0%>
<table width="665" border="0" cellspacing="0" cellpadding="1">
<tr>
<td class="xndyk"><table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td> <img src="images/003.gif" width="9" height="9"> <%=rs("title")%></td>
</tr>
<tr>
<td height="1" background="images/heng-dian.gif"></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><%=UBBCode(rs("text"))%><br>
<div align="right"><font color="#999999"><%=rs("data")%></font></div> </td>
</tr>
</table></td>
</tr>
</table>
<table width="665" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="15"></td>
</tr>
</table>
<%
rowcount=rowcount-1
rs.MoveNext
loop
end if
end if
rs.close
set rs=nothing
%>
</table>
<table border="0" align=right>
<tr>
<td valign="middle" align=right>
<%call listPages()%>
</td>
</tr>
</table>
</body>
</html>
<%
sub listPages()
'if n <= 1 then exit sub
for i=0 to n\msg_per_page-1
for j=1 to msg_per_page
%>
<font size="2" color="#006600">
<a href="<%=request.ServerVariables("script_name")%>?page=<%=i*msg_per_page+j %>">
[<% =i*msg_per_page+j %>]</a></font>
<%
next
next
EndPage = n mod msg_per_page
for j=1 to EndPage
%>
<font size="2" color="#006600">
<a href="<%=request.ServerVariables("script_name")%>?page=<% =i*msg_per_page+j %>">
<%if (i*msg_per_page+j)=currentpage then%><b><%else%><%end if%>[<% =i*msg_per_page+j %>]</b></a></font>
<%next%>
<font color=black face="arial" >
<br>Current page:<font color=#FF000000><%=currentpage%>/<%=n%></font> Total log:<font color=#FF000000><%=totalrec%></font> piece
</font>Each Page:<font color=#FF000000>2</font><font face="arial" color="black"> </font>piece
<%end sub%>
==================
记得给分啊 !
3、怎样用dreamweaver制作网页,3-4页,并且能从主页到分页,从分页到主页,求具体操作
要用来dreamweaver制作网页,首先你要源懂基本的代码,具体操作要看你是想做简单的页面还是正常的页面,简单的页面可以用Dw里面的视图窗口通过表格来完成,主页到分页再到主页是通过超链接完成,要想做一个可以上线的网页,是有很长的路要走的。你可以通过腾讯课堂去学习。具体操作要看你要做什么样的网页。
4、这个是我网页设计最简单的一个分页,能不能帮我添加一个自动缩放的分页形式,只显示当前选定页的前后三页
UIWebView继承与UIView,因此,其初始化方法和一般的view一样,通过alloc和init进行初始化,其加载数据的方式有三种:
第一种:
- (void)loadRequest:(NSURLRequest *)request;
这是加载网页最常用的一种方式,通过一个网页URL来进行加载,这个URL可以是远程的也可以是本地的,例如我加载百度的主页:
UIWebView * view = [[UIWebView alloc]initWithFrame:self.view.frame];
[view loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.baidu.com"]]];
[self.view addSubview:view];
会得到如下的效果:
第二种:
- (void)loadHTMLString:(NSString *)string baseURL:(NSURL *)baseURL;
这个方法需要将httml文件读取为字符串,其中baseURL是我们自己设置的一个路径,用于寻找html文件中引用的图片等素材。
第三种:
- (void)loadData:(NSData *)data MIMEType:(NSString *)MIMEType textEncodingName:(NSString*)textEncodingName baseURL:(NSURL *)baseURL;
这个方式使用的比较少,但也更加自由,其中data是文件数据,MIMEType是文件类型,textEncodingName是编码类型,baseURL是素材资源路径。
二、一些常用的属性和变量
@property (nonatomic,assign)id <UIWebViewDelegate> delegate;设置webView的代理
@property (nonatomic,readonly,retain)UIScrollView *scrollView;内置的scrollView
@property (nonatomic,readonly,retain)NSURLRequest *request;URL请求
- (void)reload;重新加载数据
- (void)stopLoading;停止加载数据
- (void)goBack;返回上一级
- (void)goForward;跳转下一级
@property (nonatomic,readonly,getter=canGoBack)BOOL canGoBack;获取能否返回上一级
@property (nonatomic,readonly,getter=canGoForward)BOOL canGoForward;获取能否跳转下一级
@property (nonatomic,readonly,getter=isLoading)BOOL loading;获取是否正在加载数据
- (NSString *):(NSString *)script;通过JavaScript操作web数据
@property (nonatomic)BOOL scalesPageToFit;设置是否缩放到适合屏幕大小
@property (nonatomic)UIDataDetectorTypes dataDetectorTypesNS_AVAILABLE_IOS(3_0);设置某些数据变为链接形式,这个枚举可以设置如电话号,地址,邮箱等转化为链接
@property (nonatomic)BOOL allowsInlineMediaPlaybackNS_AVAILABLE_IOS(4_0);设置是否使用内联播放器播放视频
@property (nonatomic)BOOL _AVAILABLE_IOS(4_0);设置视频是否自动播放
@property (nonatomic)BOOL mediaPlaybackAllowsAirPlayNS_AVAILABLE_IOS(5_0);设置音频播放是否支持ari play功能
@property (nonatomic)BOOL _AVAILABLE_IOS(6_0);设置是否将数据加载如内存后渲染界面
@property (nonatomic)BOOL _AVAILABLE_IOS(6_0);设置用户交互模式
三、iOS7中的一些新特性
下面这些属性是iOS7之后才有的,通过他们可以设置更加有趣的web体验
@property (nonatomic)UIWebPaginationMode paginationModeNS_AVAILABLE_IOS(7_0);
typedef NS_ENUM(NSInteger, UIWebPaginationMode) {
,//不使用翻页效果
,//将网页超出部分分页,从左向右进行翻页
,//将网页超出部分分页,从上向下进行翻页
,//将网页超出部分分页,从下向上进行翻页
//将网页超出部分分页,从右向左进行翻页
};
这个属性用来设置一种模式,当网页的大小超出view时,将网页以翻页的效果展示,枚举如下:
@property (nonatomic)CGFloat pageLengthNS_AVAILABLE_IOS(7_0);设置每一页的长度
@property (nonatomic)CGFloat gapBetweenPagesNS_AVAILABLE_IOS(7_0);设置每一页的间距
@property (nonatomic,readonly)NSUInteger pageCountNS_AVAILABLE_IOS(7_0);获取分页数
四、webView协议中的方法
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType;
准备加载内容时调用的方法,通过返回值来进行是否加载的设置
- (void)webViewDidStartLoad:(UIWebView *)webView;开始加载时调用的方法
- (void)webViewDidFinishLoad:(UIWebView *)webView;结束加载时调用的方法
- (void)webView:(UIWebView *)webView didFailLoadWithError:(NSErro
5、网页设计中如何实现分页的效果
用GridView空间,里面有自带的分页功能,将属性设置为true,然后在相应的事件里面写数据库的查询代码就可以了!
一、动态网页:这里有一段PHP代码,供参考,我这边运行成功:
1.显示内容部分
<?php
$page=$_GET["page"];
if($page=="")
{$page=1;}
if(is_numeric($page))
{
$page_size=30;
$query="select count(*) as total from solution order by id desc";
$result = mysql_db_query($dbn, $query);
$message_count=mysql_result($result,0,"total");
$page_count=ceil($message_count/$page_size);
$offset=($page-1)*$page_size;
$sql=mysql_db_query($dbn,"select * from solution order by id desc limit $offset,$page_size");
$row=mysql_fetch_object($sql);
if(!$row)
{
echo("No data!");
}
?>
<?php
do
{
?>
</p>
<p>+ <a href="<?php echo $row->pageurl; ?>.html" title="<?php echo $row->pagetitle; ?>"><?php echo $row->pagetitle; ?></a></p>
<?php
}while($row=mysql_fetch_object($sql));
?>
<?php
}
?>
2.分页部分
<?php
if($page!=1)
{
echo "<a href=index.php?page=1>First</a> ";
echo "<a href=index.php?page=".($page-1).">Previous</a> ";
}
if($page<$page_count)
{
echo "<a href=index.php?page=".($page+1).">Next</a> ";
echo "<a href=index.php?page=".$page_count.">End</a>";
}
?>
</span> <span> Current Page:<?php echo $page;?> / <?php echo $page_count;?></span>
<?php
mysql_free_result($sql);
?>
二、静态网页用js:
用JavaScript伪分页,实际上内容还是在同一个页面上。
<div id="page_1">第1页内容</div>
<div id="page_2">第2页内容</div>
<div id="page_3">第3页内容</div>
<div id="page_4">第4页内容</div>
<script type="text/javascript">//<![CDATA[
var curpage=document.hash.substr(1);
for (var i=1;i<=4;++i) {
document.getElementById('page_'+i).style.display=(i==curpage)?'':'none';
}
//]]></script>
然后用 page.htm#1 page.htm#2 page.htm#3 page.htm#4 来链接4页。
6、如何制作网页和分页?
lz说的是浏览器的设置吧,就是把这种一个浏览器打开很多网页变成一个网页单独打开内是吗? IE的话,点击容工具 -- Inernet选项 -- 更改网页在选项卡中的显示方式(设置)。 试试看里面有可以设置的没 :) 答案补充 你画红圈的那一行的左边不是有个工具吗?点击工具,选择 Inernet选项里面的‘更改网页在选项卡中的显示方式’,然后有个“遇到弹出窗口时”,选择里面的“始终在新窗口中打开”,最后点击两个确定,就OL 答案补充 错了,是右边。 答案补充 你确定你选择了"始终在新窗口中打开",并且点击了确定? 我在给你说的过程也照着操作了一遍,现在已经可以分页显示了,你再试试看,看看是不是哪一步没做对。
7、html如何制作分页
第一种方法,可以使用JS来实现网页的分页
第二种方法,结合后端语言来实现,如PHP等语言
8、网页设计分页问题
一、把判断语句改为:
If Not rs.eof Then
''如果存在这条记录,执行更新操作
......
Else
''如果不存在
......
End If
也有可能是你的数据库中确实没有这条记录,建议你再检查一下。
二、
<%set com=server.createobject("adodb.connection")
com.open "DBQ="& Server.MapPath("data.asp") &";Driver={Microsoft Access Driver (*.mdb)}"
if request("ok")="ok" then response.write "hello"
set rs=com.execute("select*from msg where edt>=#"&date&"# ORDER BY id DESC")
if rs.recordcount>0 then
rs.pagesize=10
else
response.write("暂无数据!")
response.end
end if
page=request("page")
newpage=0
if trim(page)="" then
page=1
elseif page>=rs.pagecount then
page=rs.pagecouht
end if
rs.absolutepage=page
i=i+1%>
三、
sSql="Select ID,showname,picture,content,Specifications From proct Where sortid='"&classs&"' and d_recycle=false and agreen=true ORDER BY ID DESC"
这一句SQL语言改一下,指定条件Where sortid='新闻',像这样的!!!
三种方法基本上都能解决你的问题。祝你成功~!