导航:首页 > 源码编译 > 网站欢迎界面源码

网站欢迎界面源码

发布时间:2022-12-10 19:57:14

❶ 网站源码里的swf文件如何修改用Imperator 这个转成FLA文件不能用

用闪客之锤直接导入swf文件,修改完了再导出swf影片即可

❷ 网页里源码是什么

源码就是指编写的最原始程序的代码。运行的软件是要经过编写的,程序员编写程序的过程中需要他们的“语言”。音乐家用五线谱,建筑师用图纸,那程序员的工作的语言就是“源码”了。
网页源码,静态的是HTML,动态的有ASP、PHP、ASPX、JSP。

❸ 网页弹出个框框源码

最基本的弹出窗口代码】

<SCRIPT LANGUAGE="javascript">
<!--
window.open ('page.html')
-->
</SCRIPT>

因为这是一段javascript代码,所以它们应该放在<SCRIPT LANGUAGE ="javascript">标签和</script>之间。

<!--和-->是对一些版本低的浏览器起作用,在这些老浏览器中如果不支持javascript,不会将标签中的代码作

为文本显示出来。

Window.open ('page.html')用于控制弹出新的窗口page.html,如果page.html不与主窗口在同一路径下,前面

应写明路径,绝对路径(http://)和相对路径(../)均可。
用单引号和双引号都可以,只是不要混用。
这一段代码可以加入HTML的任意位置,加入到<head>和</head>之间也可以,位置越靠前执行越早,尤其是页面

代码较长时,又想使页面早点弹出就尽量往前放。

【经过设置后的弹出窗口】

下面再说一说弹出窗口外观的设置。只要再往上面的代码中加一点东西就可以了。
我们来定制这个弹出窗口的外观、尺寸大小、弹出位置以适应该页面的具体情况。

<SCRIPT LANGUAGE="javascript">
<!--
window.open('page.html','newwindow','height=100,width=400,top=0,left=0,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no,status=no')
//写成一行
-->
</SCRIPT>

参数解释:
<SCRIPT LANGUAGE="java script"> js脚本开始;
window.open 弹出新窗口的命令
page.html 弹出新窗口的文件名;
newwindow 弹出窗口的名字(不是文件名),可用空 〃代替;
height=100 窗口高度;
top=0 窗口距离屏幕上方的像素值;
left=0 窗口距离屏幕左侧的像素值;
toolbar=no 是否显示工具栏,yes为显示;
menubar,scrollbars 表示菜单栏和滚动栏;
resizable=no 是否允许改变窗口大小,yes为允许;
location=no 是否显示地址栏,yes为允许;
status=no 是否显示状态栏内的信息(通常是文件已经打开),yes为允许;
</SCRIPT> js脚本结束。

【用函数控制弹出窗口】

下面是一个完整的代码。
<html>
<head>
<script LANGUAGE="javascript">
<!--
function openwin(){
window.open("page.html","newwindow","height=100,width=400,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no,status=no";)
//写成一行
}
-->
</script>
</head>
<body onload="openwin()">
...任意的页面内容...
</body>
</html>
这里定义了一个函数openwin(),函数内容就是打开一个窗口。在调用它之前没有任何用途。怎么调用呢?
方法一:<body onload="openwen()"> 浏览器读页面时弹出窗口;
方法二:<body onunload="openwen()"> 浏览器离开页面时弹出窗口;
方法三:用一个连接调用:<a href="#" onclick="openwin()">打开一个窗口</a>
注意:使用的"#"是虚连接。
方法四:用一个按钮调用:<input type="button" onclick="openwin()" value="打开窗口">

【主窗口打开文件1.htm,同时弹出小窗口page.html】

将如下代码加入主窗口<head>区:
<script language="javascript">
<!--
function openwin(){
window.open("page.html","","width=200,height=200";)
}
//-->
</script>

加入<body>区:<a href="1.htm" onclick="openwin()">open</a>即可。

【弹出的窗口之定时关闭控制】

下面我们再对弹出窗口进行一些控制,效果就更好了。如果我们再将一小段代码加入弹出的页面(注意是加入到page.html的HTML中,可不是主页面中,否则…),让它在10秒钟后自动关闭是不是更酷了?

首先,将如下代码加入page.html文件的<head>区:

<script language="javascript">
function closeit() {
setTimeout("self.close()",10000) //毫秒
}
</script>

然后,再用<body onload="closeit()">这一句话代替page.html中原有的<BODY>这一句就可以了。(这一句话千

万不要忘记写啊!这一句的作用是调用关闭窗口的代码,10秒钟后就自行关闭该窗口。)

【在弹出窗口中加上一个关闭按钮】

<form>
<INPUT TYPE='BUTTON' value='关闭' onClick='window.close()'>
</form>
呵呵,现在更加完美了!

【内包含的弹出窗口——一个页面两个窗口】

上面的例子都包含两个窗口,一个是主窗口,另一个是弹出的小窗口。
通过下面的例子,你可以在一个页面内完成上面的效果。

<html>
<head>
<SCRIPT LANGUAGE="javascript">
function openwin()
{
OpenWindow=window.open("","newwin","height=250,width=250,toolbar=no,scrollbars="+scroll+",menubar=no";);
//写成一行
OpenWindow.document.write("<TITLE>例子</TITLE>";)
OpenWindow.document.write("<BODY BGCOLOR=#FFFFFF>";)
OpenWindow.document.write("<H1>Hello!</h1>";)
OpenWindow.document.write("New window opened!";)
OpenWindow.document.write("</BODY >";)
OpenWindow.document.write("</HTML>";)
OpenWindow.document.close()
}
</script>
</head>
<body>
<a href="#" onclick="openwin()">打开一个窗口</a>
<input type="button" onclick="openwin()" value="打开窗口">
</body>
</html>

看看OpenWindow.document.write()里面的代码不就是标准的HTML吗?只要按照格式写更多的行即可。千万注意多一个标签或少一个标签都会出现错误。记住用OpenWindow.document.close()结束啊。

【终极应用——弹出窗口的Cookie控制】

回想一下,上面的弹出窗口虽然酷,但是有一点小毛病(你沉浸在喜悦之中,一定没有发现吧?)比如你将上面的脚本放在一个需要频繁经过的页面里(例如首页),那么每次刷新这个页面,窗口都会弹出一次,是不是非常烦人?有解决的办法吗?Yes!Follow me。我们使用Cookie来控制一下就可以了。

首先,将如下代码加入主页面HTML的<HEAD>区:

<script>
function openwin(){
window.open("page.html","","width=200,height=200" ;)
}
function get_cookie(Name){
var search = Name+ "="
var returnvalue ="";
if (documents.cookie.length >0){
offset = documents.cookie.indexOf(search)
if (offset!=-1){
offset += search.length
end = documents.cookie.indexOf (";",offset);
if (end ==-1)
end = documents.cookie.length;
returnvalue =unescape(documents.cookie.substring(offset,end))
}
}
return returnvalue;
}
function loadpopup(){
if (get_cookie(’popped’)==";){
openwin()
documents.cookie="popped=yes"
}
}
</script>

然后,用<body onload="loadpopup()">(注意不是openwin 而是loadpop啊)替换主页面中原有的<BODY>这一句即可。你可以试着刷新一下这个页面或重新进入该页面,窗口再也不会弹出了。真正的Pop-Only-Once!
写到这里,弹出窗口的制作和应用技巧基本上算是讲完了,希望对正在制作网页的朋友有所帮助我就非常欣慰了。
需要注意的是,JS脚本中的大小写最好前后保持一致。

没有菜单、工具栏、地址栏的弹出窗口:

<script language="javascript">
<!--
var gt = unescape('%3e');
var popup = null;
var over = "Launch Pop-up Navigator";
popup = window.open('', 'popupnav', 'width=500,height=500,resizable=0,scrollbars=auto'); // width=500,height=500为窗口长和宽
if (popup != null) {
if (popup.opener == null) {
popup.opener = self; }
popup.location.href = '要打开的文件名';
}
// -->
</script>

离开一个页面时弹出一个可定制的窗口

<!-- Begin
function leave() {
window.open(\'离开页面时弹出窗口的URL\',\'\',\'toolbar=no,menubar=no,location=no,height=235,width=320\');
}
// End -->
</script>

如下代码加入HTML的<BODY>区:<body onUnload="leave()">

超级弹窗代码(MYIE也照弹)

<script language="javascript">
focusid=setTimeout("focus();window.showModelessDialog(\'http://www.3tian.com\',\'\',\'scroll:1;status:0;help:0;resizable:1;dialogWidth:0px;dialogHeight:0px\')",0000)
</script>
<script language="javascript">
<!--
function clock(){i=i-1
document.title="";#定义标题
if(i>0)setTimeout("clock();",1000);
else self.close();}
……………………………………
这是很完备的代码了
你可以尝试一下
好运
走先……

❹ 网页设计常用HTML代码

网页设计常用HTML代码大全

HTML是用来描述网页的一种语言。下面我为大家分享HTML代码,希望对大家学习html代码有帮助!

忽视右键

<body oncontextmenu="return false">

<body style="overflow-y:hidden">

1.如何几秒后转到别的页面?

<META HTTP-EQUIV="Refresh" CONTENT="时间;URL=地址">

2.点击关闭窗口

<a href="javascript:top.window.close();">点击关闭窗口</a>!

3.请问如何去掉主页右面的滚动条?

<body scroll="no">

<body style="overflow-y:hidden">

4.请问如何做到让一个网页自动关闭.

<html>

<head>

<OBJECT id=closes type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">

<param name="Command" value="Close">

</object>

</head>

<body onload="window.setTimeout(‘‘‘‘closes.Click()‘‘‘‘,10000)">

这个窗口会在10秒过后自动关闭,而且不会出现提示. </body>

如何在不刷新页面的情况下刷新css?

<style>

button{ color:#000000;}

</style>

<button onclick=document.styleSheets[0].rules[0].style.color=‘‘‘‘red‘‘‘‘>点击按钮直接修改style标签里button选择符使按钮改为红色</button>

请问如何让网页自动刷新?

在head部记入<META HTTP-EQUIV="Refresh" content="20">其中20为20秒后自动刷新,你可以更改为任意值。

5.如何让页面自动刷新?

方法一,用refresh

HTML 代码片段如下:

<head>

<meta http-equiv="refresh" content="5">

</head>

5表示刷新时间

[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]

方法二,使用setTimeout控制

<img src=/logo.gif>

<script>

function rl(){

document.location.reload()

}

setTimeout(rl,2000)

</script>

6.如何让超链接没有下划线

在源代码中的<HEAD>…</HEAD>之间输入如下代码:

<style type="text/css"> <!--

a { text-decoration: none}

--> </style>

7.请问如何去掉IE的上下滚动条?

<body style=‘‘‘‘overflow:scroll;overflow-y:hidden‘‘‘‘>

</body>

8.怎样才能把RealPlayer文件在网页做一个试听连接?

<embed height=25src=51js.rm type=audio/x-pn-realaudio-plugin width=50 autostart="false" controls="PlayButton">

9.如何用html实现浏览器上后退按钮的功能?

<a href="java script:history.go(-1)">点击后退</a>

或者

<script> history.back() </script>

10.请问怎么在网页中改变鼠标的箭头形状?

HTML 代码片段如下:

<body>

<a href="#" style="cursor: auto;">auto</a><br>

<a href="#" style="cursor: crosshair ">crosshair </a><br>

<a href="#" style="cursor: default ">default </a><br>

<a href="#" style="cursor: hand ">hand </a><br>

<a href="#" style="cursor: move ">move </a><br>

<a href="#" style="cursor: e-resize ">e-resize </a><br>

<a href="#" style="cursor: ne-resize ">ne-resize </a><br>

<a href="#" style="cursor: nw-resize">nw-resize</a><br>

<a href="#" style="cursor: n-resize">n-resize</a><br>

<a href="#" style="cursor: se-resize">se-resize</a><br>

<a href="#" style="cursor: sw-resize">sw-resize</a><br>

<a href="#" style="cursor: s-resize">s-resize</a><br>

<a href="#" style="cursor: w-resize">w-resize</a><br>

<a href="#" style="cursor: text">text</a><br>

<a href="#" style="cursor: wait">wait</a><br>

<a href="#" style="cursor: help">help</a><br>

</body>

11.怎样不使用页面的缓存?即每一次打开页面时不是调用缓存中的东西

<META HTTP-EQUIV="Pragma" CONTENT="no-cache">

12.页面打开时自动弹出一个窗口的代码怎么写?

HTML 代码片段如下:

<html>

<head>

<title>Untitled Document</title>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<script language="<B style="color:black;background-color:#A0FFFF">javascript</B>">

<!--

function MM_openBrWindow(theURL,winName,features) { //v2.0

window.open(theURL,winName,features);

}

//-->

</script>

</head>

<body bgcolor="#FFFFFF" text="#000000" onLoad="MM_openBrWindow(‘‘‘‘http://www.35ui.cn/‘‘‘‘,‘‘‘‘,‘‘‘‘width=400,height=400‘‘‘‘)">

</body>

</html>

13.如何让我的页面出现一个会讲话的小人?Merlin

HTML 代码片段如下:

<HTML>

<HEAD>

<TITLE>默林</TITLE>

<META http-equiv=Content-Type content="text/html; charset=gb2312">

</HEAD>

<BODY>

<p><OBJECT id=sims classid=CLSID:D45FD31B-5C6E-11D1-9EC1-00C04FD7081F>

</OBJECT>

<SCRIPT>

var MerlinID;

var MerlinACS;

sims.Connected = true;

MerlinLoaded = LoadLocalAgent(MerlinID, MerlinACS);

Merlin = sims.Characters.Character(MerlinID);

Merlin.Show();

Merlin.Play("Surprised");

Merlin.Speak("大家好");

Merlin.Play("GestureLeft");

Merlin.Think("我是默林!");

Merlin.Play("Pleased");

Merlin.Think("可爱吗?");

Merlin.Play("GestureDown");

Merlin.Speak("哈哈!");

Merlin.Hide();

function LoadLocalAgent(CharID, CharACS){

LoadReq = sims.Characters.Load(CharID, CharACS);

return(true);

}

</SCRIPT>

</p>

<p> </p>

<p>看此效果必须装有office2000!!!</p>

</BODY>

</HTML>

14.在页面中如何加入不是满铺的背景图片,拉动页面时背景图不动

HTML 代码片段如下:

<html><head>

<STYLE>

body {background-image:url(logo.gif);

background-repeat:no-repeat; background-position:center }

</STYLE>

</head>

<body bgproperties="fixed" >

</body>

</html>

[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]

background-repeat:no-repeat; 是让背景图不占满整个页面

body bgproperties="fixed" 是拉动scroll时背景图不动

15.文本输入框什么属性能实现不可输入?

HTML 代码片段如下:

<input type="text" name="textfield" disabled>

或者

<input type="text" name="textfield" readonly>

16.如何禁止自己的页面在别人的框架里打开?

把以下代码加至你的<head>区

<script>

if (window.top!=self){

window.top.location=self.location

}

</script>

17.如何实现首页全屏幕显示?

HTML 代码片段如下:

<html>

<body><script language="<B style="color:black;background-color:#A0FFFF">javascript</B>">

var coolw=642

var coolh=400

var coolhuang=window.open("http://www.35ui.cn","coolhuang","width="+coolw+",height="+coolh+",

fullscreen=1,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0")

window.close()

</script></body></html>

18.如何监听一个窗口被关闭了?

HTML 代码片段如下:

<body onunload="alert(‘‘‘‘你关闭了这个窗口‘‘‘‘)">

19.如何禁止Ctrl+N?

HTML 代码片段如下:

<body onkeydown=return(!(event.keyCode==78&&event.ctrlKey))>

如何把页面加入用户的收藏夹?

HTML 代码片段如下:

<a href="<B style="color:black;background-color:#A0FFFF">javascript</B>:window.external.AddFavorite(‘‘‘‘http://www.35ui.cn‘‘‘‘,‘‘‘‘无忧脚本‘‘‘‘)">收藏无忧脚本</a>

如何在我的'页面中加入背景音乐?

IE: <bgsound src="*.mid" loop=infinite>

NS:<embed src="*.mid" autostart=true hidden=true loop=true>

*.mid你的背景音乐的midi格式文件

关于页面转换效果

<meta http-equiv="page-enter" content="revealTrans(Duration=4,Transition=23)">

<meta http-equiv="page-exit" content="revealTrans(Duration=4,Transition=23)">

说明:Transition=23是随机效果,另可以选0-22任一数字固定某个效果

如何设定打开页面的大小

HTML 代码片段如下:

<body onload="top.resizeTo(300,200);"><!--(width,height)-->

怎样双击滚屏,单击停止?

HTML 代码片段如下:

<html>

<head>

<title>新网页1</title>

</head>

<body>

<script language"<B style="color:black;background-color:#A0FFFF">javascript</B>">

var currentpos,timer;

function initialize()

{

timer=setInterval("scrollwindow()",10);

}

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>

<p>a</p><p>a</p><p>a</p><p>aa</p><p>aa</p><p>aa</p>

<p>aa</p><p>aa</p><p>aa</p><p>aa</p><p>aa</p><p>aa</p>

<p>aa</p><p>aa</p><p>aa</p><p>aa</p><p>aa</p><p>aa</p>

<p>aa</p><p>aa</p><p>aa</p><p>aa</p><p>a</p>

</body>

</html>

如何让body中的文字不被选中?

HTML 代码片段如下:

<body onselectstart="return false" >aaa</body>

如何让弹出的窗口不能关闭?

在新开的窗口中加入如下代码

<body onunload=open(location.href)>

</body>

如何让浏览器在保存页面时保存失败?

HTML 代码片段如下:

<NOSCRIPT>

<<B style="color:black;background-color:#ffff66">IFRAME</B> SRC="*.html">

</<B style="color:black;background-color:#ffff66">IFRAME</B>>

</NOSCRIPT>

表单中如何用图片按钮实现 reset?

<html>

<head>

<script>

function aaa(){

document.forms[0].reset()

}

</script>

</head>

<body>

<form>

<textarea rows="2" name="S1" cols="20"></textarea>

<input type="submit" values="提交" name="B1">

<image src="logo.gif" onclick=aaa()>

</form>

</body></html>

进入网页时弹出的信息对话框

<body onLoad="window.alert(‘‘‘‘欢迎光临本站‘‘‘‘)">

关闭窗口后弹出对话框

<body onUnload="window.alert(‘‘‘‘谢谢你的光临!欢迎下次再来!‘‘‘‘)">

告别提示

<body onUnload= alert("再见,感谢你的访问!")>

右键菜单的制作

<OBJECT id=menu type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">

<PARAM name="Command" value="Related Topics,menu">

<PARAM name="Item1" value="动易;http://www.35ui.cn">

<PARAM name="Item2" value="搜狐;http://www.35hu.cn">

<PARAM name="Item3" value="新浪;http://www.35no.cn">

<PARAM name="Item4" value="网易;http://www.chinsgp.cn">

<PARAM name="Item5" value="互动学院;http://www.35ui.cn">

</OBJECT> <script> if (document.all) document.body.onmousedown=new Function("if (event.button==2) menu.Click();") </script>

下拉菜单

<object id=HHCtrl type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"> <PARAM name="Command" value="Related Topics,Menu"> <PARAM name="Item1" value="aspease;http://www.35ui.cn"> <PARAM name="Item2" value="byhu;http://www.35ui.cn"> <PARAM name="Item3" value="lzz;http://www.35ui.cn"> </object> <a href=javascript:HHCtrl.Click() title="下拉菜单">下拉菜单</a>

;

❺ 怎么查看网页源代码下视频

从字面意义上来讲,源文件是指一个文件,指源代码的集合。源代码则是一组具有特定意义的,可以实现特定功能的字符(程序开发代码)。
2、“源代码”在大多数时候等于“源文件”
3、网站的源码可以构建成一个网页、也能构成一个网站。
4、最简单的理解就是网站的源程序。
“比如在这个网页上右键鼠标,选择查看源文件,出来一个记事本,里面的内容就是此网页的源代码。”这句话就体现了他们的关系,此处的源文件是指网页的源代码,而源代码就是源文件的内容,所以又可以称做网页的源代码。
源代码是指原始代码,可以是任何语言代码。
汇编码是指源代码编译后的代码,通常为二进制文件,比如DLL、EXE、.NET中间代码、JAVA中间代码等。
高级语言通常指C/C++ 、 BASIC、C# 、JAVA、PASCAL 等等 汇编语言就是ASM,只有这个,比这个更低级的就是机器语言了。
分类
网站源码也分为两种,一种是动态源码如:ASP,PHP,JSP,.NET,CGI等,一种是静态源码如:HTML等。
动态源码
在服务器端运行的程序、网页、组件,属于动态网页,它们会随不同客户、不同时间,返回不同的网页,例如ASP、PHP、JSP、NET、CGI等。
最大的特点就是能够和用户之间互动。比如说网易的信箱,张三登陆的时候,会看到欢迎光临张三,李四又登陆了,李四又看到欢迎光临李四,其实他们两个人登陆的是一个页面,这个就是动态源码的好处,如果要是用静态源码,好像网易有几百万的邮箱用户,每个人做一个页面那要多少页啊? 动态源码不单单只有这么一点用处,比如说我们常见的一些论坛、留言本、计数器、聊天室等,都是由动态源码开发的。动态源码最大的特点就是有数据库,

❻ jsp登陆界面源代码

1、login.jsp文件

<%@ page language="java" contentType="text/html; charset=GB18030"

pageEncoding="GB18030"%>

<%@ page import="java.util.*" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

<title>登录页面</title>

</head>

<body>

<form name="loginForm" method="post" action="judgeUser.jsp">

<table>

<tr>

<td>用户名:<input type="text" name="userName" id="userName"></td>

</tr>

<tr>

<td>密码:<input type="password" name="password" id="password"></td>

</tr>

<tr>

<td><input type="submit" value="登录" style="background-color:pink"> <input

type="reset" value="重置" style="background-color:red"></td>

</tr>

</table>

</form>

</body>

</html>

2、judge.jsp文件

<%@ page language="java" contentType="text/html; charset=GB18030"

pageEncoding="GB18030"%>

<%@ page import="java.util.*" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

<title>身份验证</title>

</head>

<body>

<%

request.setCharacterEncoding("GB18030");

String name = request.getParameter("userName");

String password = request.getParameter("password");

if(name.equals("abc")&& password.equals("123")) {

3、afterLogin.jsp文件

%>

<jsp:forward page="afterLogin.jsp">

<jsp:param name="userName" value="<%=name%>"/>

</jsp:forward>

<%

}

else {

%>

<jsp:forward page="login.jsp"/>

<%

}

%>

</body>

</html>

<%@ page language="java" contentType="text/html; charset=GB18030"

pageEncoding="GB18030"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

<title>登录成功</title>

</head>

<body>

<%

request.setCharacterEncoding("GB18030");

String name = request.getParameter("userName");

out.println("欢迎你:" + name);

%>

</body>

</html>

(6)网站欢迎界面源码扩展阅读:

java web登录界面源代码:

1、Data_uil.java文件

import java.sql.*;

public class Data_uil

{

public Connection getConnection()

{

try{

Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");

}catch(ClassNotFoundException e)

{

e.printStackTrace();

}

String user="***";

String password="***";

String url="jdbc:sqlserver://127.0.0.1:1433;DatabaseName=***";

Connection con=null;

try{

con=DriverManager.getConnection(url,user,password);

}catch(SQLException e)

{

e.printStackTrace();

}

return con;

}

public String selectPassword(String username)

{

Connection connection=getConnection();

String sql="select *from login where username=?";

PreparedStatement preparedStatement=null;

ResultSet result=null;

String password=null;

try{

preparedStatement=connection.prepareStatement(sql);

preparedStatement.setString(1,username);

result=preparedStatement.executeQuery();//可执行的 查询

if(result.next())

password=result.getString("password");

}catch(SQLException e){

e.printStackTrace();

}finally

{

close(preparedStatement);

close(result);

close(connection);

}

System.out.println("找到的数据库密码为:"+password);

return password;

}

public void close (Connection con)

{

try{

if(con!=null)

{

con.close();

}

}catch(SQLException e)

{

e.printStackTrace();

}

}

public void close (PreparedStatement preparedStatement)

{

try{

if(preparedStatement!=null)

{

preparedStatement.close();

}

}catch(SQLException e)

{

e.printStackTrace();

}

}

public void close(ResultSet resultSet)

{

try{

if(resultSet!=null)

{

resultSet.close();

}

}catch(SQLException e)

{

e.printStackTrace();

}

}

}

2、login_check.jsp:文件

<%@ page language="java" contentType="text/html; charset=utf-8"

pageEncoding="utf-8"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<title>验证用户密码</title>

</head>

<body>

<jsp:useBean id="util" class="util.Data_uil" scope="page" />

<%

String username=(String)request.getParameter("username");

String password=(String)request.getParameter("password");

if(username==null||"".equals(username))

{

out.print("<script language='javaScript'> alert('用户名不能为空');</script>");

response.setHeader("refresh", "0;url=user_login.jsp");

}

else

{

System.out.println("输入的用户名:"+username);

String passwordInDataBase=util.selectPassword(username);

System.out.println("密码:"+passwordInDataBase);

if(passwordInDataBase==null||"".equals(passwordInDataBase))

{

out.print("<script language='javaScript'> alert('用户名不存在');</script>");

response.setHeader("refresh", "0;url=user_login.jsp");

}

else if(passwordInDataBase.equals(password))

{

out.print("<script language='javaScript'> alert('登录成功');</script>");

response.setHeader("refresh", "0;url=loginSucces.jsp");

}

else

{

out.print("<script language='javaScript'> alert('密码错误');</script>");

response.setHeader("refresh", "0;url=user_login.jsp");

}

}

%>

</body>

</html>

3、loginSucces.jsp文件

<%@ page language="java" contentType="text/html; charset=utf-8"

pageEncoding="utf-8"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

<title>Insert title here</title>

</head>

<body>

<hr size="10" width="26%" align="left" color="green">

<font size="6" color="red" >登录成功 </font>

<hr size="10" width="26%" align="left" color="green">

</body>

</html>

4、user_login.jsp文件

<%@ page language="java" contentType="text/html; charset=utf-8"

pageEncoding="utf-8"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

<title>登录界面</title>

</head>

<body background="C:Userswin8workspaceLoginimage\_10.jpg" >

<center>

<br><br><br><br><br><br>

<h1 style="color:yellow">Login</h1>

<br>

<form name="loginForm" action="login_check.jsp" method="post">

<table Border="0" >

<tr >

<td>账号</td>

<td><input type="text" name="username"></td>

</tr>

<tr>

<td>密码</td>

<td><input type="password" name="password">

</td>

</tr>

</table>

<br>

<input type="submit" value="登录" style="color:#BC8F8F">

</form>

</center>

</body>

</html>

❼ VB6.0中做欢迎界面

欢迎界面应该为启动窗体,那样才符合正规的软件制作!
具体的做法就是:
建立一个frmSplash
在里面写代码如下:
Private Sub Form_Load()
frmSplash.Show
form1.Show
Unload Me
End Sub
建议不要使用TIMER控件,用一个delay函数比较好!

❽ asp程序实现简单的注册,登录网页的源代码

1,(index.asp 用户登陆页面)
<!-- #include file="conn.asp" -->
<!-- blog.soowooo.cn 悠悠长假期 -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>会员</title>
<style type="text/css">
<!--
body,td,th {
font-family: 宋体;
font-size: 14px;
}
-->
</style>
</head>
<body>
<center>
<p>会员注册系统</p>
<form name="form1" method="post" action="login.asp">
<table width="34%" border="0">
<tr>
<td width="33%" height="30">用户名:</td>
<td width="67%" height="30"><input name="username" type="text" id="username" size="15"></td>
</tr>
<tr>
<td height="30">密 码:</td>
<td height="30"><input name="password" type="password" id="password" size="15"></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" name="Submit" value="确定">
<input type="reset" name="Submit" value="重置"></td>
</tr>
<tr>
<td colspan="2"><a href="reg.asp" target="_self">注册</a></td>
</tr>
</table>
</form>
</center>
</body>

</html>

2,(login.asp 用户数据处理文件)

<!-- #include file="conn.asp" -->
<%
'打开数据库判断用户是否存在,info为表名,username为字段名
set rsc=server.createobject("adodb.recordset")
sqlc="select * from info where username='"&request.Form("username")&"' and password='"&request.Form("password")&"'"
rsc.open sqlc,conn,1,1
session("username")=rsc("username")
session("password")=rsc("password")
session.Timeout=30
set rsc=nothing
response.Redirect("change.asp")
'如果用户不存在,session("username")为空
%>
3,(change.asp 用户信息修改页面)
<!-- #include file="conn.asp" -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>修改</title>
<style type="text/css">
<!--
body,td,th {
font-size: 14px;
}
-->
</style></head>
<center>
<body>
<br>
<%

set rsc=server.createobject("adodb.recordset")
sqlc="select * from info where username='"&session("username")&"' and password='"&session("password")&"'"
rsc.open sqlc,conn,1,1
nr=rsc("password")
username=rsc("username")
password=rsc("password")
sex=rsc("sex")
qq=rsc("qq")
mail=rsc("mail")
add=rsc("add")
personalinfo=rsc("personalinfo")
vv=rsc("ntime")
set rsc=nothing
if nr="" then
response.Redirect("index.asp")
end if
if strcomp(nr,request.Form("password"))=0 then
response.Write("欢迎你!"&request.Form("username"))
response.Write("你是在"&vv&"注册的")
session("username")=request.Form("username")
end if
if session("username")="" then
response.Redirect("index.asp")
end if
%>
<form name="form1" method="post" action="change.asp?ac=ch">
<table width="39%" height="105" border="0" >
<tr>
<td width="27%" height="30">用户名:</td>
<td width="73%" height="30"><input name="username" type="text" id="username" value="<%=username%>">
*</td>
</tr>
<tr>
<td height="30">密 码:</td>
<td height="30"><input name="password" type="text" id="password" value="<%=password%>">
*</td>
</tr>
<tr>
<td height="30">性 别:</td>
<td height="30"><input name="sex" type="text" id="sex" value="<%=sex%>"></td>
</tr>
<tr>
<td height="30">QQ:</td>
<td height="30"><input name="qq" type="text" id="qq" value="<%=qq%>"></td>
</tr>
<tr>
<td height="30">Mail:</td>
<td height="30"><input name="mail" type="text" id="mail" value="<%=mail%>"></td>
</tr>
<tr>
<td height="30">地 址:</td>
<td height="30"><input name="add" type="text" id="add" value="<%=add%>"></td>
</tr>
<tr>
<td>介绍</td>
<td><textarea name="personalinfo" cols="30" rows="6" id="personalinfo"><%=personalinfo%></textarea></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="Submit" value="修改">
<a href="change.asp?se=y" target="_self">退出系统</a></td>
<% if strcomp(request.QueryString("se"),"y")=0 then
session("username")=""
response.Redirect("index.asp")
end if
%>
</tr>
</table>
</form>
<%
if strcomp(request.QueryString("ac"),"ch")=0 then
set rs=server.createobject("adodb.recordset")
sql="select * from info where username='"&session("username")&"'"
rs.open sql,conn,1,3
rs("username")=request.Form("username")
rs("password")=request.Form("password")
rs("mail")=request.Form("mail")
rs("sex")=request.Form("sex")
rs("qq")=request.Form("qq")
rs("add")=request.Form("add")
rs("personalinfo")=request.Form("personalinfo")
rs.update
set rs=nothing
response.Write("修改完成!")
end if
%>
</body>
</center>
</html>
4,(reg.asp 新用户注册页面)
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>用户注册</title>
<style type="text/css">
<!--
body,td,th {
font-family: 宋体;
font-size: 14px;
}
-->
</style>
</head>
<body>
<center>
用户注册<br>
<%
=request.QueryString("msg")
%>
<form name="form1" method="post" action="addnewdata.asp?ac=adser">
<table width="39%" height="105" border="0" >
<tr>
<td width="27%" height="30">用户名:</td>
<td width="73%" height="30"><input name="username" type="text" id="username">
*</td>
</tr>
<tr>
<td height="30">密码:</td>
<td height="30"><input name="password" type="password" id="password">
*</td>
</tr>
<tr>
<td height="30">确定密码:</td>
<td height="30"><input name="password2" type="password" id="password2">
*</td>
</tr>
<tr>
<td height="30">性别:</td>
<td height="30"><input name="sex" type="text" id="sex"></td>
</tr>
<tr>
<td height="30">QQ:</td>
<td height="30"><input name="qq" type="text" id="qq"></td>
</tr>
<tr>
<td height="30">Mail:</td>
<td height="30"><input name="mail" type="text" id="mail"></td>
</tr>
<tr>
<td height="30">地址:</td>
<td height="30"><input name="add" type="text" id="add"></td>
</tr>
<tr>
<td>个人介绍</td>
<td><textarea name="personalinfo" cols="30" rows="6" id="personalinfo"></textarea></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="Submit" value="提交"></td>
</tr>
</table>
</form>
</center>
</body>
</html>
5,(addnewdata.asp 新用户注册数据处理文件)
<!-- #include file="conn.asp" -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>成功</title>
</head>
<body>
<%
ac=request.QueryString("ac")
msg="注册错误信息"
if request.Form("username")="" then
msg=msg&"<br>"&"用户名不能为空"
end if
if strcomp(cstr(request.Form("password")),cstr(request.Form("password2")))<>0 then
msg=msg&"<br>"&"两次密码输入不同"
end if

if len(request.Form("password"))<6 then
msg=msg&"<br>"&"密码太简单"
end if

if strcomp(msg,"注册错误信息")>0 then
response.Redirect("reg.asp?msg="&msg)
end if
if ac="adser" then
set rsc=server.createobject("adodb.recordset")
sql="select * from info where username='"&request.Form("username")&"'"
rsc.open sql,conn,1,1
ck=rsc("username")
set rsc=nothing
if ck<>"" then
msg=msg&"<br>"&"用户名被人注册"
response.Redirect("reg.asp?msg="&msg)
end if
dsql="select * from info where id is null"
set rs=server.createobject("adodb.recordset")
rs.open dsql,conn,1,3
rs.addnew
rs("username")=request.Form("username")
rs("password")=request.Form("password")
rs("mail")=request.Form("mail")
rs("sex")=request.Form("sex")
rs("qq")=request.Form("qq")
rs("add")=request.Form("add")
rs("personalinfo")=request.Form("personalinfo")
rs("ntime")=now
rs.update
set rs=nothing
%>
<center>
<a href="index.asp" target="_self">注册成功,点击登陆</a>
</center>
<%
end if
%>
</body>
</html>

6,(conn.asp 数据库连接文件)
<%
'连接数据库开始
dim conn,rs,sql
on error resume next
dbpath=server.mappath("userinfo.mdb")
set conn=server.createobject("adodb.connection")
conn.open "PROVIDER=Microsoft.jet.OLEDB.4.0;data source="
'创建记录对象
set rs=server.createobject("adodb.recordset")
%>

7,(userinfo.mdb ACCESS 数据库)
在ACCESS中建一个表,然后在这个表中建立字段名称
表名:info

字段名称 数据类型
id 自动编号
username 文本
password 文本
sex 文本
quest 文本
qq 文本
mail 文本
personalinfo 文本
ntime 文本

❾ asp登录界面源代码

要是你要的话。我可以发一个文件给你。里面的内容是一本书的所有例子。包括有
“留言板、注册和登陆、Blog、小型论坛、新闻发布等等。”
都是ASP版的。只要你建好站点。复制相应的文件到你站点下就行了。

❿ 源码是什么意思啊

源码指编写的最原始程序的代码。

用户平时使用软件时就是程序把“源码”翻译成我们可直观的形式表现出来供用户使用的。任何一个网站页面,换成源码就是一堆按一定格式书写的文字和符号。

源码主要功用

1、生成目标代码,即计算机可以识别的代码。

2、对软件进行说明,即对软件的编写进行说明。为数不少的初学者,甚至少数有经验的程序员都忽视软件说明的编写,因为这部分虽然不会在生成的程序中直接显示,也不参与编译。

但是说明对软件的学习、分享、维护和软件复用都有巨大的好处。因此,书写软件说明在业界被认为是能创造优秀程序的良好习惯,一些公司也硬性规定必须书写。

(10)网站欢迎界面源码扩展阅读:

计算机里面运行的所有东西都是用程序编出来的,而编写程序要用到计算机语言,用计算机语言直接编出来的程序就叫源码,比如用VisualBasic编写的源码文件一般为.bas文件,而用C++编写的一般为.cpp文件,源代码不能直接运行,必须编译后才能运行。源码经过编译处理后就可以直接在操作系统下运行了。

从字面意义上来讲,源文件是指一个文件,指源代码的集合.源代码则是一组具有特定意义的可以实现特定功能的字符(程序开发代码)。“源代码”在大多数时候等于“源文件”。

阅读全文

与网站欢迎界面源码相关的资料

热点内容
单片机高电平驱动 浏览:115
ios多选文件夹 浏览:907
加强行车调度命令管理 浏览:241
服务器已禁用什么意思 浏览:148
部队命令回复 浏览:753
神奇宝贝服务器地图怎么设置 浏览:380
加密算法输出固定长度 浏览:862
程序员去重庆还是武汉 浏览:121
服务器如何撤销网页登录限制 浏览:980
微信公众平台php开发视频教程 浏览:628
怎么看苹果授权绑定的app 浏览:255
压缩机单级压缩比 浏览:380
linux测试php 浏览:971
什么时候梁旁边需要加密箍筋 浏览:40
微信清粉软件源码 浏览:717
matlabdoc命令 浏览:550
如何去ping服务器 浏览:75
ecshop安装php55 浏览:817
javaword库 浏览:958
php图片路径数据库中 浏览:488