dreamweaver中文本框问题
谁能帮我把显示时间的框框去掉,万分感谢,仅有的5分了。。。。。。<scriptlanguage="javascript">functionshow(){varx=newD...
谁能帮我把显示时间的框框去掉,万分感谢,仅有的5分了。。。。。。
<script language="javascript">
function show()
{
var x= new Date();
var y=x.getYear();// 年
var m=x.getMonth();//月
var d=x.getDay();//星期
var ds=x.getDate();//日
var h=x.getHours();//小时
var m1=x.getMinutes();//分
var s=x.getSeconds();//秒
var day;
if (x.getDay()==0) day="星期日";
if (x.getDay()==1) day="星期一";
if (x.getDay()==2) day="星期二";
if (x.getDay()==3) day="星期三";
if (x.getDay()==4) day="星期四";
if (x.getDay()==5) day="星期五";
if (x.getDay()==6) day="星期六";
var timer=""+((h>12) ? h-12 : h);
timer +=((m1<10) ? ":0 " : ":")+m1;
timer +=((s<10) ? ":0 " : ":" )+s;
timer += ""+((h >=12) ? "pm" : "am");
document.s1.b1.value=y;
document.s1.b2.value=m+1;
document.s1.b3.value=ds;
document.s1.b4.value=timer;
document.s1.b5.value=day;
setTimeout("show()",1000);
}
</script>
</head>
<body onload="show()">
<left>
<form name="s1" onSubmit="0">
<input type="text" name="b1" size="5">年
<input type="text" name="b2" size="5">月
<input type="text" name="b3" size="5">日
<input type="text" name="b4" size="15">
<input type="text" name="b5" size="5">
</form>
</left>
</body>
</html> 展开
<script language="javascript">
function show()
{
var x= new Date();
var y=x.getYear();// 年
var m=x.getMonth();//月
var d=x.getDay();//星期
var ds=x.getDate();//日
var h=x.getHours();//小时
var m1=x.getMinutes();//分
var s=x.getSeconds();//秒
var day;
if (x.getDay()==0) day="星期日";
if (x.getDay()==1) day="星期一";
if (x.getDay()==2) day="星期二";
if (x.getDay()==3) day="星期三";
if (x.getDay()==4) day="星期四";
if (x.getDay()==5) day="星期五";
if (x.getDay()==6) day="星期六";
var timer=""+((h>12) ? h-12 : h);
timer +=((m1<10) ? ":0 " : ":")+m1;
timer +=((s<10) ? ":0 " : ":" )+s;
timer += ""+((h >=12) ? "pm" : "am");
document.s1.b1.value=y;
document.s1.b2.value=m+1;
document.s1.b3.value=ds;
document.s1.b4.value=timer;
document.s1.b5.value=day;
setTimeout("show()",1000);
}
</script>
</head>
<body onload="show()">
<left>
<form name="s1" onSubmit="0">
<input type="text" name="b1" size="5">年
<input type="text" name="b2" size="5">月
<input type="text" name="b3" size="5">日
<input type="text" name="b4" size="15">
<input type="text" name="b5" size="5">
</form>
</left>
</body>
</html> 展开
2个回答
展开全部
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="t1">
<tr>
<td colspan="5" valign="top"><IMG SRC="../images/user-1_08.gif" WIDTH=1 HEIGHT=1></td>
</tr>
<tr valign="top" bgcolor="#FCD2EE">
<td height="30" colspan="5" align="left"><img src="../images/icon1.gif"><a href="write.asp">+日记</a> <a href="index.asp">+心情日记</a></td>
</tr>
<tr bgcolor="#ffcccc">
<td width="23%" height="30">日期</td>
<td width="47%" height="30">标题</td>
<td width="8%"> 保密</td>
<td width="8%">浏览数</td>
<td width="14%">操作</td>
</tr>
<%
dim i,intPage,page,pre,last,filepath
set rs = server.CreateObject("adodb.recordset")
sql="select id,savetime,title,hits,issecret from f_diaries where uid='"&session("uid")&"' order by id desc"
rs.PageSize = 20 '这里设定每页显示的记录数
rs.CursorLocation = 3
rs.Open sql,conn,0,2,1 '这里执行你查询SQL并获得结果记录集
pre = true
last = true
page = trim(Request.QueryString("page"))
if len(page) = 0 then
intpage = 1
pre = false
else
if cint(page) =< 1 then
intpage = 1
pre = false
else
if cint(page) >= rs.PageCount then
intpage = rs.PageCount
last = false
else
intpage = cint(page)
end if
end if
end if
if not rs.eof then
rs.AbsolutePage = intpage
end if
%>
<%
for i=1 to rs.PageSize
if rs.EOF or rs.BOF then exit for
%>
<tr>
<td height="25"><%=trim(rs("savetime"))%></td>
<td height="25" align="left"><a href="show.asp?id=<%=trim(rs("id"))%>"><%if len(trim(rs("title")))>20 then
response.Write left(trim(rs("title")),20)
response.Write "..."
else
response.Write trim(rs("title"))
end if
%></a></td>
<td><%if rs("issecret")=0 then%>公开<%else%>保密<%end if%></td>
<td height="25"><%=trim(rs("hits"))%></td>
<td height="25"><a href="del.asp?id=<%=trim(rs("id"))%>">删除</a> <a href="change.asp?id=<%=trim(rs("id"))%>">修改</a></td>
</tr>
<%
rs.movenext
next
%>
<tr>
<td colspan="6">
<table width="99%" border="1" cellpadding="2" bgcolor="#ffcccc" cellspacing="2" borderColorLight="#808080" borderColorDark="#ffffff">
<tr>
<%if rs.pagecount > 0 then%>
<td width="23%" align="left">当前页<font color="#ff0000"><%=intpage%></font>/<%=rs.PageCount%> <%=rs.PageSize%>篇/页 </td>
<%else%>
<td width="15%" align="left">当前页0/0</td><%end if%>
<td width="62%" align="right"> <a href="index.asp?page=1">首页</a>|
<%if pre then%>
<a href="index.asp?page=<%=intpage -1%>">上页</a>| <%end if%>
<%if last then%>
<a href="index.asp?page=<%=intpage +1%>">下页</a> |<%end if%>
<a href="index.asp?page=<%=rs.PageCount%>">尾页</a>|转到第
<select name="sel_page" onchange="javascript:location=this.options[this.selectedIndex].value;">
<%
for i = 1 to rs.PageCount
if i = intpage then%>
<option value="index.asp?page=<%=i%>" selected><%=i%></option>
<%else%>
<option value="index.asp?page=<%=i%>"><%=i%></option>
<%
end if
next
%>
</select>页</font>
</td>
</tr>
</table>
</td>
</tr>
<%
rs.close
set rs=nothing
%>
</table>
二:无组件上传随便就可以找到,我给你个地址,你自己去下下来看看:http://www.ziyuan8.com/down/Soft/html/9/23/ZY8_7641.html
三:你在安装Dw的时候,会自动安装一个Extension Manager的东西,解压后用这个东西去安装,很简单的,一看就会操作了,祝楼主好运
补充:Zip是压缩文件,你得将他解压后再载入,就OK了。
<tr>
<td colspan="5" valign="top"><IMG SRC="../images/user-1_08.gif" WIDTH=1 HEIGHT=1></td>
</tr>
<tr valign="top" bgcolor="#FCD2EE">
<td height="30" colspan="5" align="left"><img src="../images/icon1.gif"><a href="write.asp">+日记</a> <a href="index.asp">+心情日记</a></td>
</tr>
<tr bgcolor="#ffcccc">
<td width="23%" height="30">日期</td>
<td width="47%" height="30">标题</td>
<td width="8%"> 保密</td>
<td width="8%">浏览数</td>
<td width="14%">操作</td>
</tr>
<%
dim i,intPage,page,pre,last,filepath
set rs = server.CreateObject("adodb.recordset")
sql="select id,savetime,title,hits,issecret from f_diaries where uid='"&session("uid")&"' order by id desc"
rs.PageSize = 20 '这里设定每页显示的记录数
rs.CursorLocation = 3
rs.Open sql,conn,0,2,1 '这里执行你查询SQL并获得结果记录集
pre = true
last = true
page = trim(Request.QueryString("page"))
if len(page) = 0 then
intpage = 1
pre = false
else
if cint(page) =< 1 then
intpage = 1
pre = false
else
if cint(page) >= rs.PageCount then
intpage = rs.PageCount
last = false
else
intpage = cint(page)
end if
end if
end if
if not rs.eof then
rs.AbsolutePage = intpage
end if
%>
<%
for i=1 to rs.PageSize
if rs.EOF or rs.BOF then exit for
%>
<tr>
<td height="25"><%=trim(rs("savetime"))%></td>
<td height="25" align="left"><a href="show.asp?id=<%=trim(rs("id"))%>"><%if len(trim(rs("title")))>20 then
response.Write left(trim(rs("title")),20)
response.Write "..."
else
response.Write trim(rs("title"))
end if
%></a></td>
<td><%if rs("issecret")=0 then%>公开<%else%>保密<%end if%></td>
<td height="25"><%=trim(rs("hits"))%></td>
<td height="25"><a href="del.asp?id=<%=trim(rs("id"))%>">删除</a> <a href="change.asp?id=<%=trim(rs("id"))%>">修改</a></td>
</tr>
<%
rs.movenext
next
%>
<tr>
<td colspan="6">
<table width="99%" border="1" cellpadding="2" bgcolor="#ffcccc" cellspacing="2" borderColorLight="#808080" borderColorDark="#ffffff">
<tr>
<%if rs.pagecount > 0 then%>
<td width="23%" align="left">当前页<font color="#ff0000"><%=intpage%></font>/<%=rs.PageCount%> <%=rs.PageSize%>篇/页 </td>
<%else%>
<td width="15%" align="left">当前页0/0</td><%end if%>
<td width="62%" align="right"> <a href="index.asp?page=1">首页</a>|
<%if pre then%>
<a href="index.asp?page=<%=intpage -1%>">上页</a>| <%end if%>
<%if last then%>
<a href="index.asp?page=<%=intpage +1%>">下页</a> |<%end if%>
<a href="index.asp?page=<%=rs.PageCount%>">尾页</a>|转到第
<select name="sel_page" onchange="javascript:location=this.options[this.selectedIndex].value;">
<%
for i = 1 to rs.PageCount
if i = intpage then%>
<option value="index.asp?page=<%=i%>" selected><%=i%></option>
<%else%>
<option value="index.asp?page=<%=i%>"><%=i%></option>
<%
end if
next
%>
</select>页</font>
</td>
</tr>
</table>
</td>
</tr>
<%
rs.close
set rs=nothing
%>
</table>
二:无组件上传随便就可以找到,我给你个地址,你自己去下下来看看:http://www.ziyuan8.com/down/Soft/html/9/23/ZY8_7641.html
三:你在安装Dw的时候,会自动安装一个Extension Manager的东西,解压后用这个东西去安装,很简单的,一看就会操作了,祝楼主好运
补充:Zip是压缩文件,你得将他解压后再载入,就OK了。
展开全部
这样改去掉了时间又能正常显示星期几
<script language="javascript">
function show()
{
var x= new Date();
var y=x.getYear();// 年
var m=x.getMonth();//月
var d=x.getDay();//星期
var ds=x.getDate();//日
var day;
if (x.getDay()==0) day="星期日";
if (x.getDay()==1) day="星期一";
if (x.getDay()==2) day="星期二";
if (x.getDay()==3) day="星期三";
if (x.getDay()==4) day="星期四";
if (x.getDay()==5) day="星期五";
if (x.getDay()==6) day="星期六";
document.s1.b1.value=y;
document.s1.b2.value=m+1;
document.s1.b3.value=ds;
document.s1.b5.value=day;
setTimeout("show()",1000);
}
</script>
</head>
<body onload="show()">
<left>
<form name="s1" onSubmit="0">
<input type="text" name="b1" size="5">年
<input type="text" name="b2" size="5">月
<input type="text" name="b3" size="5">日
<input type="text" name="b5" size="5">
</form>
</left>
</body>
</html>
<script language="javascript">
function show()
{
var x= new Date();
var y=x.getYear();// 年
var m=x.getMonth();//月
var d=x.getDay();//星期
var ds=x.getDate();//日
var day;
if (x.getDay()==0) day="星期日";
if (x.getDay()==1) day="星期一";
if (x.getDay()==2) day="星期二";
if (x.getDay()==3) day="星期三";
if (x.getDay()==4) day="星期四";
if (x.getDay()==5) day="星期五";
if (x.getDay()==6) day="星期六";
document.s1.b1.value=y;
document.s1.b2.value=m+1;
document.s1.b3.value=ds;
document.s1.b5.value=day;
setTimeout("show()",1000);
}
</script>
</head>
<body onload="show()">
<left>
<form name="s1" onSubmit="0">
<input type="text" name="b1" size="5">年
<input type="text" name="b2" size="5">月
<input type="text" name="b3" size="5">日
<input type="text" name="b5" size="5">
</form>
</left>
</body>
</html>
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询