随笔分类 - JS
摘要:alert('2' 2); //这个结果是false,首先三个等号要比较数据类型,字符串和整数不相等 alert('2'==2); //这个结果是true,因为是两个等号,所以不会比较数据类型,字符串‘2’会自动转换成数字2,所以相等alert(‘10’>9); //这个结果是ture,首先字符串和
阅读全文
摘要:<!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title></title> </head><style>ul,h2{margin: 0; padding: 0;}li{list-style-type: none;}#list{width:
阅读全文
摘要:<!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title></title><style>#input1{margin-left: 200px;}#div1{position: relative;top: 100px;margin: 0 20
阅读全文
摘要:1.给标签价 class属性的时候,记住是 ClassName, 例如:var oImg = document.getElementById('img1'); 要给这个对象价class属性 oimg.class这个写法是错误的,oimg.className才是正确的写法 2. 在javascipt中
阅读全文
摘要:<!DOCTYPE html><html<head> <meta charset="UTF-8"> <title></title> <link rel="stylesheet" href="css/1.css" /> <style> 在css中,因为p标签有个margin ,所以margin 要置为
阅读全文

浙公网安备 33010602011771号