Web前端復習:程式設計題
表單設計

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>表單設計</title>
</head>
<body>
<form>
<fieldset>
<legend>我的個人資訊</legend>
姓名:<input type="text" name="name" size= "24" required><br/>
年齡:<input type="number" name="age" maxlength="3"><br/>
性別:
<input type="radio" name="radio1" checked> 男
<input type="radio" name= "radio1"> 女 </br>
國籍:
<select name="national">
<option value="1" selected>中華人民共和國</option>
<option value="2">其它</option>
</select></br>
入學時間 : <input type="date" /> <br>
學號:<input type="text" name="xuehao" maxlength="10" pattern="^2020[0-9]{6}" placeholder="格式:2020007172" required><br/>
郵箱:<input type="email" name="email"></br>
博客網址:<input type="url" name="url"></br>
密碼:<input type ="password" name ="mima" size="24"></br>
個人簡介:
<textarea cols="50" rows="5" wrap="hard"></textarea></br>
愛好:
<input type="checkbox" name="checkbox1" >唱歌
<input type="checkbox" name="checkbox1" >跳舞
</fieldset>
<input type="submit" value="提交">
<input type="reset" value="重置">
</form>
</body>
</html>
日期物件

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Context-Type" content="text/html; charset= UTF-8">
<title>日期物件</title>
<script type="text/javascript">
function Datedemo(){
var date = new Date();
var year = date.getFullYear();
var month = date.getMonth();
month = month + 1;
var day = date.getDate();
//document.write("當前日期為:"+year+"年"+month+"月"+day+"日");
alert("當前日期為:"+year+"年"+month+"月"+day+"日");
}
</script>
</head>
<body>
<button onclick="Datedemo()">點擊顯示日期</button>
</body>
</html>
最后一門專業課!!!
一切順利
轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/404375.html
標籤:其他
