html/css/js/jquery
lkk1344
在梦想的道路上继续奔跑吧!
展开
-
JavaScript写的数字加法
无标题文档 window.onload=function (){ var otxt1=document.getElementById('txt1'); var otxt2=document.getElementById('txt2'); var obtn1=document.getElementById('bt原创 2015-11-07 16:04:41 · 995 阅读 · 0 评论 -
javascript面向对象特征
无标题文档document.write("js面向对象:封装");function Person(name,sal){this.name=name; //公开var sal=sal;//私有this.showInfo=function(){ //公开document.write(""+this.name+"--"+sal);}}var per=new Person("tom原创 2015-11-19 08:26:58 · 371 阅读 · 0 评论 -
javascript之dom编程(2):常用对象1
一:history对象无标题文档//history对象 记录用户访问的urlfunction myback(){window.alert(history.length);window.history.go(-1);}b.html二:location对象//location对象包含当前url的信息原创 2015-11-25 15:25:53 · 233 阅读 · 0 评论 -
javascript之dom编程(3):常用对象2
一:document对象无标题文档//document最重要的三个方法//getElementById [html php jsp] (如果页面中有多个相同的id,则返回第一个对象引用)//getElementsByName 通过html控件的名字返回对象集合 多用于多选。//getElementsByTagName 通过html的标签名返回对象原创 2015-11-25 15:27:05 · 300 阅读 · 0 评论 -
javascript之dom编程(1):简单用法
一:基本案例无标题文档当前时间:----//html dom编程//每个html文件的元素都会被当做一个Node节点对象来看待,var i=0;var myspan=document.getElementById("myspan");function abc(){var mytime=new Date();//对象.innt原创 2015-11-25 15:24:43 · 373 阅读 · 0 评论 -
jQuery 事件
jQuery 是为事件处理特别设计的。jQuery 事件函数jQuery 事件处理函数是 jQuery 中的核心函数。事件处理函数是当 HTML 中发生事件时自动被调用的函数。由“事件”(event)“触发”(triggered)是经常被用到的术语。在您 中由于 jQuery 是为事件处理特别设计的,通常是把 jQuery 代码置于网页 部分的“事件处理原创 2015-11-25 15:20:08 · 242 阅读 · 0 评论 -
jquery动画
jQuery 是为事件处理特别设计的。jQuery 事件函数隐藏、显示、切换、滑动 以及动画。WOW!Because time is valuable, wedeliver quick and easy learning.At W3School, you can studyeverything you need to learn, in an accessible原创 2015-11-25 15:22:18 · 323 阅读 · 0 评论 -
JavaScript基本数据类型和运算
无标题文档function test1(){window.alert("你点击了button");}function test2(){//定义两个变量并且赋值var num1=2;var num2=3;var res=num1+num2;window.alert("num1+num2="+res);}function test3(){var name="hello"原创 2015-11-18 22:26:50 · 281 阅读 · 0 评论 -
CSS3画图2
CSS3绘图div{width:200px;height:200px;border:#F00 solid 1px;margin-bottom:10px;text-align:center;vertical-align:middle;}/*4个角的半径全部是20px*/div:first-of-type{border-radius:20px;}/*第一个是上下,第二个是左右原创 2015-11-18 22:21:48 · 590 阅读 · 0 评论 -
HTML5新增标签2,视频,音频,调节颜色
HTML5$(document).ready(function(e) { $('input').change(function(e){var red=$('#red').val();var green=$('#green').val();var blue=$('#blue').val(); //当前修改的值var value=$(this).val();$(th原创 2015-11-18 21:53:56 · 808 阅读 · 0 评论 -
HTML5音乐导航
音乐导航#nav{list-style-type:none;/*去掉无序列表前面的点*/margin:50px auto 0px;/*上边界50px,左右居中,下边界为0*/width:960px;height:38px;color:#333;font-size:14px;padding:0px; overflow:hidden;}#nav li{width:1原创 2015-11-18 22:07:05 · 1805 阅读 · 0 评论 -
HTML5新增标签1
HTML新增标签header,nav,section,footer{width:750px;height:40px;border:#ccc solid 1px;margin-bottom:5px;margin:auto;}aside,article{width:300px;float:left;border:#ccc solid 1px;margin-left:5px;原创 2015-11-18 22:00:10 · 291 阅读 · 0 评论 -
html5拖放
一:拖放(Drag 和 drop)拖放是一种常见的特性,即抓取对象以后拖到另一个位置。在 HTML5 中,拖放是标准的一部分,任何元素都能够拖放。二:案例一 #div1 {width:488px;height:400px;padding:10px;border:1px solid #aaaaaa;} /*原创 2015-11-18 22:09:30 · 349 阅读 · 0 评论 -
jquery基础语法
jQuery 语法实例$(this).hide()jQuery hide() 函数,隐藏当前的 HTML 元素。 $(document).ready(function(){ $("button").click(function(){ $(this).hide();});});Clickme$("#test").hide()jQuery hide() 函数原创 2015-11-22 09:21:59 · 278 阅读 · 0 评论 -
jQuery 选择器
选择器允许您对元素组或单个元素进行操作。jQuery 选择器在前面的章节中,我们展示了一些有关如何选取 HTML 元素的实例。关键点是学习 jQuery 选择器是如何准确地选取您希望应用效果的元素。jQuery 元素选择器和属性选择器允许您通过标签名、属性名或内容对 HTML 元素进行选择。选择器允许您对 HTML 元素组或单个元素进行操作。原创 2015-11-22 09:34:15 · 249 阅读 · 0 评论 -
javascript之html元素文本输出
JavaScript 语句向浏览器发出的命令。语句的作用是告诉浏览器该做什么。下面的 JavaScript 语句向 id="demo" 的 HTML 元素输出文本 "Hello World" 。下面是代码:document.getElementById("demo").innerHTML="hello world";但是这里有一点,必须把js代码块放在body里面,例如这样原创 2015-10-16 08:53:07 · 6694 阅读 · 0 评论 -
css3控制背景渐变
1.background:-moz-linear-gradient(top,#15A216,#fafafa);/*火狐*/ 2.background: -webkit-linear-gradient(top,#152134,#fafafa);/*谷歌*/ 3.其他浏览器例如IE不兼容以下是在谷歌下运行的代码和效果图 背景渐变 div{原创 2015-09-23 21:52:09 · 391 阅读 · 0 评论 -
css3的弹性布局
css弹性布局: 1.给父标签指定:display:-webkit-box 2.给子标签指定:-web-box-flex:1,是每个子标签都占一份 3.盒子的排列:排列是横向还是纵向 -webkit-box-orient,vertical表示纵向,horizonta表示横向 header{ display:-webki原创 2015-09-23 21:11:42 · 500 阅读 · 1 评论 -
javascript函数的使用
一:函数的基本用法function test1(num1,num2){return num1+num2;}//普通调用window.alert(test1(2,3));//指针调用var my=test1;window.alert(my);var res=my(3,4);alert(res);二:函数调用机制function abc(num1){if(num1>3)原创 2015-11-19 08:23:54 · 237 阅读 · 0 评论