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

📄

📁 我做的第一个学生管理系统
💻
📖 第 1 页 / 共 3 页
字号:
	<PARAM NAME="PenWidth" VALUE="0">
	<PARAM NAME="PageBorder" VALUE="0">
	<PARAM NAME="Header" VALUE="">
	<PARAM NAME="Footer" VALUE="">
	<PARAM NAME="TableSep" VALUE="|;">
	<PARAM NAME="TableBorder" VALUE="7">
	<PARAM NAME="TablePen" VALUE="0">
	<PARAM NAME="TablePenLR" VALUE="0">
	<PARAM NAME="TablePenTB" VALUE="0">
	<PARAM NAME="HTMLStyle" VALUE="1">
</OBJECT>

<P><INPUT id=button1 name=button1 onclick="Toprint()" style="HEIGHT: 24px; WIDTH: 56px" type=button value="打 印">
  <INPUT id=button2 name=button2 onclick="Toprintview()" type=button value="打印预览">
  <INPUT id=button3 name=button3 onclick="Tonext()" style="HEIGHT: 24px; WIDTH: 72px" type=button value="下一页">
  <INPUT id=button4 name=button4 onclick="Tolast()" style="HEIGHT: 24px; WIDTH: 75px" type=button value="上一页">
  <INPUT id=button5 name=button5 onclick="ToFirst()" style="HEIGHT: 24px; WIDTH: 72px" type=button value="首  页">
  <INPUT id=button6 name=button6 onclick="ToEnd()" type=button value="最后页">
  <INPUT id=button7 name=button7 onclick="toPrinterSetup()" type=button value="打印设置" >
  <INPUT id=button8 name=button8 onclick="toZoomOut()" type=button value="放大">
  <INPUT id=button9 name=button9 onclick="toZoomIn()" type=button value="缩小"></P>
 <script language="VBScript">
'	vp.preview = true
'	vp.LoadDoc "\\Qhsf\C\xkprint.prn"  '"c:\xkprint.prn"
 </script>  
 <script language="VBScript" style="BACKGROUND-COLOR: cadetblue">
 	sub Toprint()
		vp.AbortWindow = true
		vp.PrintDoc 
	 
			
	end sub
	
	sub Toprintview()
		vp.Preview = true
		'vp.HTMLFileName="c:\123.htm"
		'msgbox "ok"
		'showtable1()
		
	'vp.Preview = false
	'showtable()
	end sub
	
	sub Tonext()
		if vp.Previewpage < vp.PageCount then
			vp.PreviewPage = vp.PreviewPage + 1
		end if	
	end sub	
	
	sub Tolast()
		if vp.Previewpage >1 then
			vp.PreviewPage = vp.PreviewPage - 1
		end if
	
	end sub
	
	sub ToFirst()
		vp.PreviewPage = 1
	
	end sub
	
	sub ToEnd()
		vp.PreviewPage = vp.PageCount
	
	end sub
	
	sub ToPrinterSetup()
		vp.PrintDialog(1)	
	end sub
	
	sub ToZoomOut()
		vp.ZoomMax = 50
		vp.zoom = 150
	end sub
	
	sub ToZoomIn()
	
		vp.zoomMin = 10
		vp.zoom = 50
	end sub 
	
Sub ShowTable() 
     dim test(100)
     RDS1.Server="http://<%=REQUEST.SERVERVARIABLES("SERVER_NAME")%>"
     RDS1.Connect="database=school;uid=sa;pwd=;dsn=school"
    rds1.SQL = " select 学号,姓名,性别,图片 from student "
    rds1.ExecuteOptions = 1
    rds1.Refresh
    
    rds1.Recordset.Movefirst
	'for i = 0 to 98 
	'	test(i)=""
		'msgbox i
	'	for j = 0 to 3
		'msgbox rds1.Recordset.fields(j)
			'vp.TableCell(tcText,i+1,j+1,i+1,j+1) = rds1.Recordset.fields(j)
			'vp.TableCell(tcForeColor,i+1,j+1,i+1,j+1) = vbRed
			
	'		test(i) = test(i)+rds1.Recordset.fields(j)
	'		test(i) = test(i)+"|"
			'test(i) = test(i)+grid1.columns.item(j).value +"|"
	'	next
		'grid1.row = grid1.row +1 
	'	rds1.Recordset.movenext
	'next
	
    f = "+1440|+^1000|+^1000|+>4700|+^1000;"

    ' create header string (repeat across page breaks)
   ' Dim h As String  
    h = "学号" &vbLf & "OK1|OK2"& "|姓名|性别|图片"

    vp.StartDoc
   'vp.StartTable 
    ' show header and green first row
    'vp.AddTable f, h, b(1), vbYellow, vbGreen
	'vp.AddTableArray f, h, test, vbYellow, vbGreen
	'vp.TableBorder = tbAll
	'vp.TableCell(tcRows)=100
	'vp.TableCell(tcCols)=6
	
		

    ' append row pairs (white, green)
    'Dim I as Integer
    'vp.Header = "|全校学生信息情况一览表" & "| page %d"
    vp.Header = "Document:" & vbLf & "全校学生信息情况一览表" & "||Page" & vbLf & "%d"

    vp.AddTable f, h, test(0), vbGreen, ,false
    
    rds1.Recordset.movefirst
     
    For i = 1 To 98
		for k =1 to 10000
		next
		
		teststr = ""
		for j = 0 to 3
			teststr = teststr + rds1.Recordset.fields(j) + "|"
		next
	   vp.AddTable f, h, teststr,,,true
	   rds1.Recordset.MoveNext	   
    Next
	vp.TableCell(tcColSpan,0,1)=2
	'vp.EndTable 
    ' done
    vp.EndDoc
    
End Sub

sub showtable1()

 vp.StartDoc

  ' start table definition
  vp.StartTable
    
    f = "+1440|+^1000|+^1000|+>4700|+^1000;"

    ' create header string (repeat across page breaks)
   ' Dim h As String  
    h = "学号" &vbLf & "OK1|OK2"& "|姓名|性别|图片"
    vp.AddTable f, h, "OK1|OK3|OK5", , ,false
            
    ' create table with four rows and four columns
    vp.TableCell(tcCols) = 4
    vp.TableCell(tcRows) = 4

    ' set some column widths (default width is 0.5in)                
    vp.TableCell(tcColWidth, , 1) = "1in"
    vp.TableCell(tcColWidth, , 2) = "1.3in"
                
    ' assign text to each cell
    'Dim r as Integer, c as Integer
    For r = 1 To 4
      For c = 1 To 4
        vp.TableCell(tcText, r, c) = "Row OK "
      Next 
    Next 

    ' format cell (1,1): make it span two columns, with a blue
    ' background, center alignment, and bold font
    vp.TableCell(tcColSpan, 1, 1) = 2
    vp.TableCell(tcBackColor, 1, 1) = vbBlue
    vp.TableCell(tcAlign, 1, 1) = taCenterMiddle
    vp.TableCell(tcFontBold, 1, 1) = True

    ' set row height for row 1
    ' (default height is calculated to fit the contents)
    vp.TableCell(tcRowHeight, 1) = "0.2in"
                
    ' format cell (3,2): make it span two columns, with a yellow
    ' background, center alignment, and bold
    vp.TableCell(tcColSpan, 3, 2) = 2
    vp.TableCell(tcBackColor, 3, 2) = vbYellow
    vp.TableCell(tcAlign, 3, 2) = taCenterMiddle
    vp.TableCell(tcFontBold, 3, 2) = True

    ' set row height for row 3
    vp.TableCell(tcRowHeight, 3) = "0.2in"

    ' set row borders all around                
    vp.TableBorder = tbAll

  ' finish table definition            
  vp.EndTable
  vp.EndDoc

end sub



sub vp_beforeHeader()

	'msgbox " before head"
end sub

sub vp_afterHeader()

	'msgbox " after head"
end sub
	
</script>
	

</html>

⌨️ 快捷键说明

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