随笔分类 -  jquery

摘要:比如1、设置value为pxx的项选中 $(".selector").val("pxx");2、设置text为pxx的项选中 $(".selector").find("option[text='pxx']").attr("selected",true); 这里有一个中括号的用法,中括号里的等号的前面是属性名称,不用加引号。很多时候,中括号的运用可以使得逻辑变得很简单。3、获取当前选中项的value $(".selector").val();4、获取当前选中项的 阅读全文
posted @ 2013-06-24 14:33 我叫龙弟弟 阅读(203) 评论(0) 推荐(0)
摘要:<!-- longdd 2013.4.26 字幕横向滚屏--><!DOCTYPE html><html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <script type="text/javascript" src="http://common.cnblogs.com/script/jquery. 阅读全文
posted @ 2013-04-26 16:54 我叫龙弟弟 阅读(311) 评论(0) 推荐(0)
摘要:在程序中经常会用到无限极分类菜单,经常性的会被绕的头昏脑胀,整理了一个简洁的方式,希望对你有帮助,轻喷!!<!DOCTYPE html><!-- by longdd 2013.4.23--><html> <head> <title>无限极分类折叠菜单</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <style type="text/css"& 阅读全文
posted @ 2013-04-23 15:33 我叫龙弟弟 阅读(2053) 评论(0) 推荐(0)
摘要:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <style type="text/css"> .list{ display:block; width:300px 阅读全文
posted @ 2013-04-13 11:17 我叫龙弟弟 阅读(692) 评论(0) 推荐(0)
摘要:<!--Before finding the right people, the only need to do is to make yourself good enough. longDD 201.4.11--><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html> <head> <title>左右选择框</title> <meta http-equiv="Content-Type" con 阅读全文
posted @ 2013-04-13 10:56 我叫龙弟弟 阅读(237) 评论(0) 推荐(0)
摘要:js方法:ps:因js方法通过class获取DOM对象需要额外函数,故使用Id获取DOM对象,所以只有第一个栏目有效,但不影响理解其原理<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta htt 阅读全文
posted @ 2013-03-14 12:24 我叫龙弟弟 阅读(1158) 评论(5) 推荐(3)
摘要:js方法:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title> New Document </title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <m 阅读全文
posted @ 2013-03-12 19:40 我叫龙弟弟 阅读(1248) 评论(1) 推荐(1)
摘要:js方法:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title> New Document </title> <meta name="Generator" content="EditPlus"> <meta name="Author&quo 阅读全文
posted @ 2013-03-11 22:16 我叫龙弟弟 阅读(709) 评论(0) 推荐(0)
摘要:<!DOCTYPE html><html> <head> <title>编辑表格</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <script type="text/javascript" src="http://common.cnblogs.com/script/jquery.js"></script> <s 阅读全文
posted @ 2013-03-10 11:19 我叫龙弟弟 阅读(1165) 评论(3) 推荐(0)
摘要:---恢复内容开始---原生js(有兼容性问题):<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><title> New Document </title><meta name="Generator" content="EditPlus"><meta name= 阅读全文
posted @ 2013-03-07 23:20 我叫龙弟弟 阅读(212) 评论(0) 推荐(0)