gutenye / learn-feng Goto Github PK
View Code? Open in Web Editor NEWhello
hello
#class1 div{
background-color:red;
}
div#class1{
background-color:red;
}
//教材上说是第一种语法正确,但是在chrome中第二种可以,第一种不行,why
Transfer this repository to my account, for better management :) , here are steps:
Settings -> Transfer -> type learn-feng
and gutenye
-> I understand, transfer this repository.
颜色搭配什么处理
<!DOCTYPE html>
<html >
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<head>
<title></title>
<link rel="stylesheet" href="style.css">
</head>
<body >
<div id=main>
</div>
</body>
<script>
var name=sessionStorage.name;
alert(name);
alert(!undefined);
alert(!name);
</script>
</html>
For programming staff, Baidu really can not help at all.
Here are some working Google Mirrors: https://github.com/6ag/Google-website
需不需要花时间学精通
原来JavaScript这么简单呀.
document.querySelector("button").addEventListener("click", e => {
console.log("You just clicked a button")
})
这个看的懂的吧.
编写好html+js文件后我用chrome试验效果,有没有好的调试工具?
//html
<div id=id3>
<div id=id4></div>
<div id=id5></div>
</div>
//style.css
#id3{
width:800px;
height:200px;
position:relative;
background-color:#699;
}
#id4{
width:50px;
height:50px;
background-color:red;
position:absolute;
left:0px;
top:0px;
}
#id5{
width:50px;
height:50px;
background-color:green;
position:absolute;
left:0px;
top:150px;
}
//js
alert(document.getElementById("id4").style.left); //null
document.getElementById("id4").style.left="0px";
alert(document.getElementById("id4").style.left); //0px
//
在外部css文件中已经定义了left的值了,为什么输出null?(从网页输出布局来看position left top等值都已经起到作用了)
...javascript
var a={
name:"fcy",
fun:function()
{
alert(this.name);
}
}
...
<!DOCTYPE html>
<html>
<head>
<title>fcy</title>
<link rel="stylesheet" href="style.css">
</head>
<script>
/*
function fun1(node){
document.getElementById("placeholder").setAttribute("src",node.getAttribute("href"));
document.getElementById("caption").childNodes[0].nodeValue=node.getAttribute("title")
}
*/
function fun1(){
alert(this.id);
}
function fun2(){}
function fun3(){}
</script>
<body >
<div id=id1 style="width:50px;height:50px;border:1px solid red;"onclick="fun1()"></div>
<div id=id2 style="width:50px;height:50px;border:1px solid blue;" onclick="fun2()"></div>
<div id=id3 onclick="fun3()">
</div>
<!--
<div style="height:100px;background-color:transparent">
<ul style="list-style-type:none">
<li>
<a href="./pic/1.jpg" onclick="fun1(this); return false;" title=11> one</a>
</li>
<li>
<a href="./pic/2.jpg" onclick="fun1(this); return false;" title=22> two</a>
</li>
<li>
<a href="./pic/3.jpg" onclick="fun1(this); return false;" title=33> three</a>
</li>
<li>
<a href="./pic/4.jpg" onclick="fun1(this); return false;" title=44> four</a>
</li>
</div>
<div style="width:800px;height:800px;">
<img id="placeholder" alt="beauty" style="height:800px;width:800px;"></img>
<p id=caption>pic</p>
</div>
-->
</body>
</html>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.