给tr添加点击事件,使用find方法查找tr下的所有层级的元素,children只查找下一层级的元素,所以使用find.find的返回值为jquery对象,在这个项目中不知道为什么使用jquery给checkbox添加checked属性或去掉checked属性不能使checkobx改变状态,所以我就把jquery对象转换为DOM对象,怎么转呢?jquery对象[0]或者get(0)就转换成DOM对象,然后直接.checked返回true或false就可以判断checkbox是否选中了.然后判断状…
如标题的情况,经常发生,尤其是在一些弹出框上面之类的. <script> function zuzhimaopao(){ e.stopPropagation(); } </script> 一般的google浏览器添加上面此项就可以,但是发现在FF下并不工作,于是有了如下: function getEvent(){ if(window.event) {return window.event;} func=getEvent.caller; while(func!=null){ var…
$('#LocalLife_PopUp_layer').find('.SelectCity_Cont ul').click(function(e){            var e=e||window.event;            var obj=e.target||e.srcElement;            $('#LocalLife_PopUp_layer').find('.SelectCity_Cont ul').find('i').removeClass("Selectma…
$(".up-list a.th1").click(function(){ $(this).next("ul#up-list-ul").show(); }); $(document).mousedown(function(e){ var _con = $("#up-list-ul"); if(!_con.is(e.target) && _con.has(e.target).length === 0){ $("#up-li…
$(function () { $("#but").click(function (e) {// $();//显示速度 /*阻止冒泡事件*/ e = window.event || e; if (e.stopPropagation) { e.stopPropagation(); } else { e.cancelBubble = true; } }); $("#UL").click(function (e) { /*阻止冒泡事件*/ e = window.event…
1.checkbox list选择 <!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 runat="server&q…
对于点击tableViewCell,调用打电话的功能,按照一般的方法,使用Appdelegate的OpenUrl的方法,使用前先使用UIAlertView展示,让用户选择是否拨打,但是发现了个简单的方法,即 1.在属性中声明一个强引用的UIWebView(WKWebView) @property(nonatomic,strong)UIWebView * webView; 2.在didSelectRowAtIndexPath:(NSIndexPath *)indexPath中添加如下 -(void…
Vue实现仿淘宝商品详情属性选择的功能 先看下效果图:(同个属性内部单选,属性与属性之间可以多选) 主要实现过程: 所使用到的数据类型是(一个大数组里面嵌套了另一个数组)具体格式如下:   attrAndValuees: [   {   'attrId': 1,   'attrName': '味道',   'valuees': [   {   'attrId': 1,   'value': '橘子味'   },   {   'attrId': 2,   'value': '草莓味'   }  …
1.input选中$('#checkBox').find('input').each(function(i){ if($(this).prop('checked')){//获取是否选中 并判断 $(this).prop('checked', false); //修改设置为不选中状态 }else{ $(this).prop('checked', true);//修改设置为选中状态 } });2.select点击下拉选择获取选中选项的值$('#demo').change(function(){   …
页面跳转反显(点击项,点击table滚动的位置,搜索条件,分页回显) 点击table tr项后,页面跳转到下级页面,返回回显搜索条件.当前页码.并将点击项select选中.滚动条也被记录回显跳转时滚动的位置 思路: 1.页面临时缓存我选择使用sessionStorage,点击tr行将搜索条件和页码,点击行的id进行存储: setSessionStore (name, content) { if (!name) return if (typeof content !== 'string') { c…