一些前端开发实用的函数—1(jquery)
来源:互联网 发布:手机淘宝苹果版本下载 编辑:程序博客网 时间:2024/06/05 17:06
To be myself, forever
获取src后面的参数
function getURLParameter(name) { var param = decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?) (&|#|;|$)').exec(location.search) || [ , "" ])[1] .replace(/\+/g, '%20')) || null; return param == "undefined" ? "--" : param; } alert(getURLParameter("ZD_WorkBillID"));
重载iframe
window.frames["Main"].location.reload();
将undefined转换成”“
function undefinedProcess(data,changeVal){ var retRuelst=""; if(data==undefined||(data+"")==''||data==null||data=='undefined'){ retRuelst=changeVal; }else{ retRuelst=data; } return retRuelst;}
显示iframe里面的元素
var ifr = document.getElementById("left");ifr.contentWindow.$("#customplan").show();
取字符串前10个
var LG_LoanDate=rptdata.data[i].LG_LoanDate.substr(0,10);
在src后拼参数
$("#daizhangyuanyin_a").attr("href","../../view/zcgl/daizhangyuanyin.jsp?ZI_ApplyBillID="+ZI_ApplyBillID+"&"+"checktype="+checktype+"&"+"ZI_WriteOffBillID="+ZI_WriteOffBillID);
下拉框
$("#selectbutton1r").find("option:selected").val();
还原下拉框
mytable=$("#new_dataCustom")[0];numone=obj.parentNode.parentNode.rowIndex;var select=document.getElementById("sex");var index=select.selectedIndex//当前坐标var option=select.options[index];if(mytable.rows[numone].cells[2].innerHTML==""){ select.options[0].selected=true;}else{ option.text=mytable.rows[numone].cells[2].innerHTML;}
导航(head)
$(obj).addClass("changePage");$(obj).siblings("li").each(function() { $(this).removeClass(); });
返回
function onback(){ history.back(); }
拼id
id='"+rptdata.data[i].ZI_ApplyBillID+"_"+rptdata.data[i].ZI_WriteOffBillID+"'ZI_WriteOffBillID_str=this.id.split("_")[1];id='remark_"+(i+1)+"' var SD_Remak=$("#remark_"+id).val();
清除a标签的焦点
a.hidefocus {outline: none;}<a class="hidefocus" hidefocus href="../../view/bbgl/baseinfo.jsp" id="baseinfo2" target="infoInput">
0 0
- 一些前端开发实用的函数—1(jquery)
- 一些前端开发实用的函数—2(jquery)
- jQuery自定义插件开发基础1——jQuery实用函数的实现
- jQuery自定义插件开发基础1——jQuery实用函数的实现 .
- jQuery自定义插件开发基础1——jQuery实用函数的实现
- 整理jQuery技巧,前端开发很实用
- 一些实用的函数
- Web前端开发和jQuery Mobile开发的一些免费资源
- 一些实用的 jQuery 技巧
- 一些实用的 jQuery 技巧
- 一些实用的 jQuery 技巧
- 一些实用的 jQuery 技巧
- 一些实用的 jQuery 技巧
- 一些实用的 jQuery 技巧
- 一些实用的 jQuery 技巧
- jquery的一些实用方法
- 收集的一些轻量级非常实用的前端开发小工具
- Android一些实用的函数
- javascrip将对象转换成json字符串
- netty 私有协议开发
- Eclipse上Hadoop开发环境搭建
- 【Java】抽象类和接口
- MVP模式在Android中的使用
- 一些前端开发实用的函数—1(jquery)
- 2016年中国电子信息百强企业出炉:华为居首
- NodeJS学习系列课程笔记(NodeJs 快速上手+用法示例)
- springmvc+mybatis 配置
- mysql查询条件的执行顺序
- mysql function
- 【Hibernate】多对多(双向)
- 哥德巴赫猜想(升级版)
- 16.7.13 B组总结