首页 技术 正文
技术 2022年11月14日
0 收藏 841 点赞 3,141 浏览 3005 个字

这两天心血来潮学习了前端,自己也做了个小小的网页,不好看QAQ 不过网页上集结了很多零碎的知识,在这里先马克一下。图片地址:https://github.com/lesroad/html-css-js-1

html

<!DOCTYPE html>
<html><head>
<title>my!</title><script src = "3.js"></script><link rel = "stylesheet" type = "text/css" href = "2.css"> <!--头部定义外部样式表--><style> /*头部定义内部样式表*/.cities { /*类选择器*/
background-color:black;
color:white;
margin:20px;
padding:20px;
text-align:center;
} #shuxing1 /*id选择器*/
{
color: red;
text-decoration:line-through;
}body
{
background: url('https://img.zhankr.net/fqt5cgkmfv0163547.png') no-repeat right top;
background-attachment:fixed;
}a:link {color:#000000;} /* 未访问链接*/
a:visited {color:#00FF00;} /* 已访问链接 */
a:hover {color:#FF00FF;} /* 鼠标移动到链接上 */
a:active {color:#0000FF;} /* 鼠标点击时 */</style></head><body onload = "load()">
<h1 class = "cities" id = "shuxing1">lesroad</h1>
<!--一级标题-->
<h2>这是错误的!</h2>
<!--二级标题-->
<a href = "http://www.baidu.com" target = "_blank"><h2>打开百度</h2></a>
<hr/>
<h3>hello kitty</h3>
<p style = "font-size: 40px; color:#66ccff">23333</p> <!--内联样式表-->
<!--段落-->
<br/>
<p class = "shuxing2">hhhhhh</p>
<hr/><div class = "cities">
<p id = "daan">123</p>
<script>
function Fun1()
{
document.getElementById("daan").innerHTML = "爱就像蓝天白云晴空万里忽然暴风雨";
}
</script>
<p><button onclick = "Fun1()">歌曲</button></p>
</div><br/>
<!--图片-->
<a href = "https://www.cnblogs.com/lesroad">
<img border="0" src="2.png" alt="hjkhj" width = "128px" target = "_blank">
</a><br/>
<hr/>
<!--表格-->
<table border = "1">
<tr>
<th>Head</th>
<td>is</td>
<td></td>
</tr><tr>
<td>(1,1)</td>
<td>(1,2)</td>
<td>(1,3)</td>
</tr>
<tr>
<td>(2,1)</td>
<td>(2,2)</td>
<td>(2,3)</td>
</tr>
</table>
<hr/><div class="cities">
<h2>London</h2>
<p>London is the capital city of England.
It is the most populous city in the United Kingdom,
with a metropolitan area of over 13 million inhabitants.</p>
</div><div class="cities">
<h2>Paris</h2>
<p>Paris is the capital and most populous city of France.</p>
</div><div class="cities">
<h2>Tokyo</h2>
<p>Tokyo is the capital of Japan, the center of the Greater Tokyo Area,
and the most populous metropolitan area in the world.</p>
</div><!--表单-->
<form>
用户名<br/>
<input type = "text" name = "123"> <br/>
密码<br/>
<input type = "password" name = "123"> <br/><br/>
<input type = "submit" value = "提交"><br/>性别<br/>
<input type = "radio" name = "123" > Male<br/>
<input type = "radio" name = "123"checked> Female<br/><select>
<option>苹果</option>
<option>香蕉</option>
</select><input type = "date"><input type = "color">
<br/><br/>
</form><!--图片分区相应图-->
<a href = "https://img.zhankr.net/rmsvgp4hjhg163548.png" width = "128" usemap = "#map1" alt = "圆"><br/><br/>
<form> <!--定位获取坐标-->
<input type = "image" src = "方.png">
</form>
<img src = "方.png" usemap = "#map2" alt = "方"><br/>
<map name = "map1">
<area href = "https://www.baidu.com/" shape = "circle" coords = "64, 64, 64" target = "_blank">
</map>
<map name = "map2">
<area href = "https://baike.baidu.com/item/%E6%A9%99/25420?fr=aladdin" shape = "rect" coords = "19, 30, 93, 106" target = "_blank">
<area href = "https://baike.baidu.com/item/%E9%9D%92/6923#viewPageContent" shape = "rect" coords = "122, 31, 197, 106" target = "_blank">
</map>
<br/></body>
</html>

css

.shuxing2
{
color:purple;
}h3
{
text-align:center;
}

js

var p = prompt("password?", "");
while(p !== "5265")
{
p = prompt("password?", "");
}
if(p == "5265")
{
alert("Welcome!");
document.write("<h1>"+"Welcome!"+"</h1>");
}
相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,497
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,910
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,744
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,498
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:8,136
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:5,300