1、網頁設計html網站代碼
2、用html如何製作一個簡單的網頁代碼?
1、首先,在計算機桌面上創建一個新文件夾,然後在該文件夾中創建一個新的文本文檔。
2、然後雙擊打開帶有記事本的文本文檔,如下圖所示,我們編寫一個簡單的html代碼。
3、單擊「另存為」的功能選項,顯示默認保存為編碼為ANSI。
4、我們將更改編碼和文件名,將其更改為如圖所示的圖像並保存。
5、然後返回到新創建的文件夾,發現有一個額外的html文件。
6、最後,使用瀏覽器打開html文件,效果如圖所示,簡單的網頁被成功編寫。
3、html網頁設計:一個簡單的登錄界面代碼!
是這樣的效果嗎?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>3</title>
<script>
function r()
{
var username=document.getElementById("username");
var pass=document.getElementById("password");
if(username.value=="")
{
alert("請輸入用戶名");
username.focus();
return;
}
if(pass.value=="")
{
alert("請輸入密碼");
return;
}
return true;
}
</script>
</head>
<body>
<form>
<table width="350" bgcolor="#ccffcc" style="border-color" border="1">
<tr align=center>
<td>用戶名</td><td><input type="text" name="username" id="username"></td>
</tr>
<tr align=center><td>密 碼</td><td><input type="password" name="password" id="password"></td></tr>
<tr align=center><td>驗證碼</td><td><input type="text" name="yanzheng"></td></tr>
<tr align=center><td colspan="2"><input type="button" value="登 錄" onclick="r();"/> <input type="reset" value="重 置"/></td></tr>
</table>
</form>
</body>
</html>