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

📄 index.jsp

📁 JSP入门与提高.大量丰富的实例。
💻 JSP
📖 第 1 页 / 共 2 页
字号:
<%@ page contentType="text/html;charset=gb2312" %> 
<html>
<head>
<title>公司主页</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel=stylesheet href="style.css" type="text/css">
<script language="JavaScript">
function isValid(form){
    if(form.user_id.value==""){
        alert("登录名不能为空!");
	return false;
    }
    else if((form.password.value.length<3)||(form.password.value.length>8)){
        alert("密码必须是3-8位字母或数字!");
	return false;
    }
    else {
        return true;
    }
}

function checkrcchok(){
     if(document.form1.keywords.value==""){
		alert("请输入查询关键字!");
		document.form1.keywords.focus();
		return false;
	}
}
function newwin(url) {
  var newwin=window.open(url,"newwin","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=600,height=450");
  newwin.focus();
  return false;
}

<!--//

var version = "other"
browserName = navigator.appName;   
browserVer = parseInt(navigator.appVersion);

if (browserName == "Netscape" && browserVer >= 3) version = "n3";
else if (browserName == "Netscape" && browserVer < 3) version = "n2";
else if (browserName == "Microsoft Internet Explorer" && browserVer >= 4) version = "e4";
else if (browserName == "Microsoft Internet Explorer" && browserVer < 4) version = "e3";


function marquee1()
{
	if (version == "e4")
	{
		document.write("<marquee behavior=scroll direction=up width=300 height=110 scrollamount=1 scrolldelay=110 onmouseover='this.stop()' onmouseout='this.start()'>")
	}
}

function marquee2()
{
	if (version == "e4")
	{
		document.write("</marquee>")
	}
}

//-->
</script>
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="5">
<script LANGUAGE="javascript">
function submit01()
{
self.location.replace("index.jsp")
}
</script>
<jsp:include page="head.jsp" flush="true"/>
<%@ page language="java" import="java.sql.*" %>
<table width="750" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#d7e3b9" class="path_br" height="20">
  <tr>
    <td class="small" valign="bottom"> <font color=#0772b1>当前位置:</font>首页
      </td>
    <td class="small" align="right" valign="bottom">
<script language="JavaScript">
<!--                                                   
function  visitor()                                                      
{                                                      
//define variable                                                      
 var Jsay;                                                      
 var Jdayr;                                                      
 var  Jtoday= new Date();                                                      
 var  Jyear= Jtoday.getYear(); Jmonth=Jtoday.getMonth();                                                      
         Jday= Jtoday.getDay();  Jdate=Jtoday.getDate();                                                      
         Jhrs= Jtoday.getHours(); Jmin=Jtoday.getMinutes();                                                      
          Jsec=Jtoday.getSeconds();                                                         
document.write("<font color=#000000>");                                                      
                                                      
  if(Jyear<=99) document.write('<font color=#000000>'+'19'+'</font>'+(Jyear )+"<font color=#000000>"+"年"+"</font>" );                                                      
  if(Jyear>99) document.write('<font color=#000000>'+'</font>'+(Jyear )+"<font color=#000000>"+"年"+"</font>" );                                                      
  document.write((Jmonth+1));                                                      
  document.write("<font color=#000000>"+"月"+"</font>"+Jdate+"<font color=#000000>"+"日 "+"</font>");                                       
  document.write("");                                                      
if (Jday==1)                                                      
 document.write("<font color=#000000>"+"星期"+"</font>"+"<font color=#000000>"+"一"+"</font>");                                                      
else if (Jday==2)                                                       
 document.write("<font color=#000000>"+"星期"+"</font>"+"<font color=#000000>"+"二"+"</font>");                                                      
else if (Jday==3)                                                       
 document.write("<font color=#000000>"+"星期"+"</font>"+"<font color=#000000>"+"三"+"</font>");                                                      
else if (Jday==4)                                                       
 document.write("<font color=#000000>"+"星期"+"</font>"+"<font color=#000000>"+"四"+"</font>");                                                      
else if (Jday==5)                                                       
 document.write("<font color=#000000>"+"星期"+"</font>"+"<font color=#000000>"+"五"+"</font>");                                                      
else if (Jday==6)                                                       
 document.write("<font color=#000000>"+"星期"+"</font>"+"<font color=#000000>"+"六"+"</font>");                                                      
else if (Jday==7)                                                       
 document.write("<font color=#000000>"+"星期"+"</font>"+"<font color=#000000>"+"日"+"</font>");                                                      
}                                                      
visitor();                                                      
                                                      
// -->
                      
                           
<!-- Begin                           
                           
var days_per_month=new Array(31,28,31,30,31,30,31,31,30,31,30,31);                           
                           
var Text;                           
var timerID = null;                           
                           
var timerRunning = false;                           
                           
function showtime()                            
{                           
                           
	now = new Date();                           
                           
	var CurHour = now.getHours();                           
                           
	var CurMinute = now.getMinutes();                           
                           
	var CurMonth = now.getMonth();                           
                           
	var CurDate = now.getDate();                           
	var CurYear = now.getYear();                             
                           
	var CurSecond = now.getSeconds();                           
                           
	now = null;                           
                           
	Hourleft = 23 - CurHour                           
                           
	if (Hourleft < 10){Hourleft = '0'+Hourleft;}                           
                           
	Minuteleft = 59 - CurMinute                           
                           
	if (Minuteleft < 10){Minuteleft = '0'+Minuteleft;}                           
                           
	Secondleft = 59 - CurSecond                           
	if (Secondleft < 10){Secondleft = '0'+Secondleft;}                           
                           
	var Dateleft=days_per_month[CurMonth]-CurDate                           
                           
	if (Dateleft < 10){Dateleft = '0'+Dateleft;}                           
                           
                           
	Text=Dateleft+'天'+Hourleft+'时'+Minuteleft+'分'+Secondleft+'秒';                           
                           
	if (CurYear == 100) {document.Y2K.textfield.value="ChinaByte 恭喜您进入两千年!!!"}                           
                           
	else {document.Y2K.textfield.value=Text;}                           
                           
	timerID = setTimeout("showtime()",1000);                           
                           
	timerRunning = true;                           
                           
}                           
                           
var timerID = null;                           
                           
var timerRunning = false;                           
                           
function stop()                            
{                           
                           
	if(timerRunning)                           
	clearTimeout(timerID);                           
    timerRunning = false;                           
                           
}                           
                           
function start()                            
{                           
                           
	stop();                           
	                           
	showtime();                           
                           
}                           
                           
// End -->                           
                           
</script>
&nbsp;&nbsp;
    </td>
  </tr>
</table>
<table width="750" border="0" cellspacing="0" cellpadding="0" align="center" class="body_br">
  <tr>
<td width="135" bgcolor="#d7e3b9" valign="top">
      <br>
      <table width="95%" border="0" cellspacing="0" cellpadding="3" align="center">

⌨️ 快捷键说明

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