company logo
advertisement for deep fried Twinkies


关于查询

拙风    2017-02-03 11:27:57   105   

varUser_xuesheng=factory(USERZB);User_xuesheng.query({filter:{where:{name:$api.getStorage(tddhb_key).tdname}}},function(ret,err){//。。。。})api.showProgress({title:努力加载中...});varUser_xueseng=factory(YJ_RLYLaef1ZL);User_xuesen...


JS获取开关状态

拙风    2017-01-15 08:22:12   136   

方法一: if(document.getElementById(autoLogin).checked) { user.zddl = true; } else { user.zddl = false; } 二: document.getElementById(autoLogin).addEventListener(toggle, function(event) { //event.detail.isActive 可直接获取当前状...


JS单选多选的取值

拙风    2017-01-11 17:18:45   172   

多选取值: functionselected(){varselects=document.getElementById(bingji);//varmbbj=;vartagStr=newArray();for(vari=0;iselects.length;i++){if(selects[i].selected){//alert(value:+selects[i].value+------name:+selects[i].innerHTML);//获取...


JS替换字符串中所有的中文逗号

拙风    2017-01-11 09:48:10   178   

functiontihuandouhao(cs){//替换逗号//把字符串中的中文逗号换成英文的逗号varstr=cs;while(str.indexOf(,)=0){str=str.replace(,,,);}//varb_arr=str.split(,);可以转变成数组返回//alert(b_arr.join(/))returnstr;} 有时...


api.execScript的传参问题

拙风    2017-01-03 20:35:23   77   

传参以前没有加双引号,结果总是出错,只能传数字,只要输入字母或汉字就会报错: Uncaught ReferenceError:XXXX is not defined 思考后,觉得应该是字符串问题,所以试着在变量参数两边加上双引号后...


MUI 中的mui-table-view-radio单选取值和监听

拙风    2017-01-02 09:59:38   147   

ulclass=mui-table-viewmui-table-view-chevronliclass=mui-table-view-cellahref=#notifications_disturbclass=mui-navigate-right功能消息免打扰/a/li/ululclass=mui-table-viewmui-table-view-radioliclass=mui-table-view-cellaclass=mui-navigate...


JS隐藏div和显示div

拙风    2017-01-01 07:32:49   181   

div的visibility可以控制div的显示和隐藏, 但是隐藏后页面显示空白 style=visibility: none; document.getElementById(tt).style.visibility=hidden;//隐藏 document.getElementById(tt).style.visibility=visible;//显示 通过设...


JS中获得滚动条的偏移量

拙风    2016-12-29 09:25:04   111   

varw=w||window;//指定的窗口,不带参数就是本窗口alert(w.pageYOffset)//Y下上移动量,同理X 对于显示位置的控制 varkuandu=3*35;varoffset=$api.offset(_el);varleft=Math.round(offset.l);vartop=Math.round(offset.t);va...


JSON获得键名

拙风    2016-08-27 16:44:02   53   

varjsonObject={firstname:xiaoming,lastname:wang},keys=[];for(varpinjsonObject)if(jsonObject.hasOwnProperty(p))keys.push(p);alert(keys)碰到一个问题,就是遇到{1,:a},{2,b}这种json对象,键名不固定,然后就不知道怎么取...


Foundation 学习笔记2

拙风    2016-07-03 19:28:59   135   

这页里 http://foundation.zurb.com/sites/docs/equalizer.html 有关于多行和列的排版 这里是格子的老家: http://foundation.zurb.com/sites/docs/grid.html 表单 http://foundation.zurb.com/sites/docs/forms.html...