⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gz-1.asp

📁 一个工资表
💻 ASP
字号:
<% Option Explicit   %>
<html>
<head>
	<title> 显示工资表</title>
</head>
<body background="1.gif" >
	<h1 align="center">我<FONT face=幼圆 color=blue SIZE=-1>的工资表</FONT><b>主</b><FONT face=幼圆 color=blue SIZE=-1>页</FONT>
	<% 
	'以下连上数据库,建立一个Connection对象实例db
	dim db 
	set db=Server.Createobject("ADODB.Connection") 
	db.Open "DBQ=" & Server.Mappath("./gz.mdb") & ";DRIVER={Microsoft Access Driver (*.mdb)};" 
	'以下建立Recordset对象实例rs
	dim strsql,rs 
	strsql="select * from gz order by month "        '按降序排列
	set rs=db.Execute(strsql)
	'以下显示数据库记录
	%>
	<center>
	<a href="gz-2.asp"><font size=4 color=blue face=幼圆>添加记录</font></a> &nbsp;&nbsp
        <a href="gz-5.asp"><font size=4 color=blue face=幼圆>查找记录</font></a> &nbsp;&nbsp
        <a href="gz-6.asp"><font size=4 color=blue face=幼圆>条件删除</font></a>
	<table color=silver border="2" width="90%">
	        <tr>
			<td ><font size=4 color=blue face=幼圆>姓名</font></td>
			<td ><font size=4 color=blue face=幼圆>月份</font></td>
			<td ><font size=4 color=blue face=幼圆>基本工资<</font>/td>
			<td ><font size=4 color=blue face=幼圆>奖金</font></td>
			<td><font size=4 color=blue face=幼圆>扣款</font></td>
			<td ><font size=4 color=blue face=幼圆>实际工资</font></td>
			
			<td  colspan=2 align=center><font size=4 color=blue face=幼圆>操作</font></td>
			</tr>
		<% 
		do while not rs.Eof         '只要不是结尾就执行循环
		%>
			<tr>
			<td><%=rs("Name")%></td>
			<td><%=rs("month")%></a></td>
			<td><%=rs("jbgz")%></td>
			<td><%=rs("bonus")%></td>
			<td><%=rs("kk")%></td>
			<td><%=(rs("jbgz")+rs("bonus")-rs("kk"))%></td>
			<td><a href="gz-3.asp?id=<%=rs("id")%>"><font size=4  face=幼圆>删除</font></a></td>
			<td><a href="gz-4.asp?id=<%=rs("id")%>"><font size=4  face=幼圆>修改</font></a></td>
			</font></tr>

		<% 
			rs.movenext            '将记录集指针移动到下一条记录
		loop
		%>
	</table>
	</center>
</body> 
</html> 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -