随笔分类 -  jquery Manage

主要是关于jquery的操作
摘要:运行效果如下图,pc和移动都可以展示,调用方法很简单,开始调用:loading.baosight.showPageLoadingMsg(false),false代表不现实加载说明,true展示加载说明.调用完成后调用:loading.baosight.hidePageLoadingMsg(),有两个... 阅读全文
posted @ 2014-11-07 12:06 kingjust 阅读(7574) 评论(0) 推荐(0)
摘要:在多个相同属性和元素实现展开和收起效果是,应该该是用元素或者class属性绑定事件,使用prev()和next()方法调用相应的方法。如html代码:<dlclass="Ecom_listEposition_relElinedash_bot_greyEmar10"><dt><imgsrc="/Content/Images/photo/012.jpg"alt=""width="50"height="50"class="Eborder_grey"/& 阅读全文
posted @ 2012-05-26 00:19 kingjust 阅读(874) 评论(0) 推荐(1)
摘要:只要有三个文件:一个js插件autocomplete.js和autocomplete.css两个文件,这是jquery官方网站提供的插件;他们的下载地址:http://jqueryui.com/demos/autocomplete/一个是一般处理程序 ;一个是apsx页面,看下面的代码吧;前台:<scripttype="text/javascript">$(document).ready(function(){ShowUserList($("#TextBox1"),"LoginTest.ashx"); //TextBox1 阅读全文
posted @ 2012-03-31 14:56 kingjust 阅读(1569) 评论(2) 推荐(2)
摘要:实现图片的显示实例如下:<styletype="text/css">body{margin:0;padding:40px;background:#fff;font:80%Arial,Helvetica,sans-serif;color:#555;line-height:180%;}img{border:none;}ul,li{margin:0;padding:0;}li{list-style:none;float:left;display:inline;margin-right:10px;border:1pxsolid#AAAAAA;}/*tooltip*/#t 阅读全文
posted @ 2012-02-22 17:02 kingjust 阅读(1098) 评论(0) 推荐(0)
摘要:例子展示:jquery代码:View Code <scriptlanguage="javascript">$(document).ready(function(){alert($("ulli:eq(1)").text());//选取第二个li的值alert($("p").attr("title"));//选取p的title属性的值//追加元素$('ul').append("<lititle='香蕉'>香蕉</li>").appe 阅读全文
posted @ 2012-02-22 16:22 kingjust 阅读(920) 评论(0) 推荐(0)
摘要:jquery选择器:css样式<styletype="text/css">div,span,p{width:140px;height:140px;margin:5px;background:#aaa;border:#0001pxsolid;float:left;font-size:17px;font-family:Verdana;}div.mini{width:55px;height:55px;background-color:#aaa;font-size:12px;}div.hide{display:none;}</style>jquery代码:$ 阅读全文
posted @ 2012-02-21 14:37 kingjust 阅读(7791) 评论(3) 推荐(2)
摘要:主要实现日期的显示,获取年月日,时分秒、星期、判断闰年<scriptlanguage="javascript">$(document).ready(function(){functionshow(){varmydate=newDate();var str = "" + mydate.getFullYear() + "年"; str += (mydate.getMonth() + 1) + "月"; str += mydate.getDate() + "日&nbsp;&nbsp; 阅读全文
posted @ 2012-02-04 18:22 kingjust 阅读(3656) 评论(0) 推荐(1)
摘要:jquery 全选、反选、各行换色、单击行选中事件css样式View Code 1<styletype="text/css">2table{border-collapse:collapse;}3td{border:1pxsolid#D1EEEE;}4.tr_odd{background-color:#B0E0E6;}5.tr_even{background-color:#EEE5DE;}6</style>实现代码:View Code 1<scriptlanguage="javascript">2$(document). 阅读全文
posted @ 2012-01-31 22:47 kingjust 阅读(3202) 评论(1) 推荐(0)
摘要:1 单个表格中隐藏和显示:View Code 1functionchange(){2content.style.display=3(content.style.display=="none")4?"block":"none";5link1.innerText=6(content.style.display=="none")7?"显示":"隐藏";8}9Eg:10<span><aid="link1"href="javascript 阅读全文
posted @ 2012-01-30 15:46 kingjust 阅读(892) 评论(0) 推荐(0)
摘要:使用场合:在文本框中输入提示的默认值;还有在编辑的时候,改变后显示改变的值,没有有改变择显示以前的值,也可以在加验证的时候进行封装.css样式:View Code 1<styletype="text/css">2body3{4font:normal12px/17pxArial;5}6div7{8padding:2px;9width:240px;10}11input,textarea12{13width:12em;14border:1pxsolid#FFDEAD;15}16.focus17{18border:1pxsolid#f00;19background:#F 阅读全文
posted @ 2012-01-20 13:06 kingjust 阅读(533) 评论(0) 推荐(0)
摘要:在框架中,由于session的过期有时需要返回登录页面,但存在的问题是框架的左侧或右侧返回登录页面,可以加入js代码解决:在页面加载的时候调用如下代码:function RedirectToLoginPage(){if(window != window.parent)window.parent.location.assign('Login.aspx');}欢迎指点。 阅读全文
posted @ 2012-01-12 10:03 kingjust 阅读(628) 评论(0) 推荐(0)