導航:首頁 > 源碼編譯 > 網站歡迎界面源碼

網站歡迎界面源碼

發布時間: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文件,源代碼不能直接運行,必須編譯後才能運行。源碼經過編譯處理後就可以直接在操作系統下運行了。

從字面意義上來講,源文件是指一個文件,指源代碼的集合.源代碼則是一組具有特定意義的可以實現特定功能的字元(程序開發代碼)。「源代碼」在大多數時候等於「源文件」。

閱讀全文

與網站歡迎界面源碼相關的資料

熱點內容
怎麼查移動定向流量使用的app 瀏覽:80
進入組策略的命令 瀏覽:137
python數據結構和內存 瀏覽:25
python軟體功能簡介 瀏覽:784
外國程序員一般多少歲退休 瀏覽:917
怎麼看linux和時間伺服器 瀏覽:680
程序員搞笑花名 瀏覽:501
dota2怎麼設置國服伺服器地址 瀏覽:212
單片機高電平驅動 瀏覽:115
ios多選文件夾 瀏覽:909
加強行車調度命令管理 瀏覽:243
伺服器已禁用什麼意思 瀏覽:150
部隊命令回復 瀏覽:755
神奇寶貝伺服器地圖怎麼設置 瀏覽:382
加密演算法輸出固定長度 瀏覽:862
程序員去重慶還是武漢 瀏覽:121
伺服器如何撤銷網頁登錄限制 瀏覽:980
微信公眾平台php開發視頻教程 瀏覽:628
怎麼看蘋果授權綁定的app 瀏覽:255
壓縮機單級壓縮比 瀏覽:380