jQuery数组处理汇总
摘要:$.each(array, [callback])遍历,很常用vararr=['javascript','php','java','c++','c#','perl','vb','html','css','objective-c'];$.each(arr,function(key,val){//firebugconsoleconsole.log('indexinarr:'+key+",correspondingv
阅读全文
posted @
2012-10-17 20:33
秦岭过客
阅读(1284)
推荐(0)
【转】Jquery取得iframe中元素的几种方法Javascript Jquery获取Iframe的元素、内容或者ID,反之也行!
摘要:query取得iframe中元素的几种方法 在iframe子页面获取父页面元素 代码如下: $('#objId', parent.document); // 搞定... 在父页面 获取iframe子页面的元素 代码如下: $("#objid",document.frames('iframename').document) $(document.getElementById('iframeId').contentWindow.document.body).html() 显示iframe中body元素的内容。 $("#t
阅读全文
posted @
2012-09-13 11:44
秦岭过客
阅读(657)
推荐(0)
【转】Query的extend扩展方法使用点滴
摘要:JQuery的extend扩展方法: Jquery的扩展方法extend是我们在写插件的过程中常用的方法,该方法有一些重载原型,在此,我们一起去了解了解。一、Jquery的扩展方法原型是: extend(dest,src1,src2,src3...); 它的含义是将src1,src2,src3...合并到dest中,返回值为合并后的dest,由此可以看出该方法合并后,是修改了dest的结构的。如果想要得到合并的结果却又不想修改dest的结构,可以如下使用: var newSrc=$.extend({},src1,src2,src3...)//也就是将"{}"作为dest参数
阅读全文
posted @
2012-09-05 11:08
秦岭过客
阅读(555)
推荐(0)
Jquery Ajax ashx DataTable 传参 获取参数 C#
摘要:aspx:在前台页面中引用jquery,那个版本的都行<scriptsrc="../JS/jquery-1.7.2.js"type="text/javascript"></script>加入一个按钮<inputtype="button"value="button"id="btn"/>js文件如下$(document).ready(function(){$.ajax({url:'../Handler.ashx?action=GetProvince'
阅读全文
posted @
2012-08-06 14:16
秦岭过客
阅读(5366)
推荐(1)
json2使用方法
摘要:<scripttype="text/javascript"src="json2.js"></script><script>//直接声明json数据结构varmyJSONObject={"bindings":[{"ircEvent":"PRIVMSG","method":"newURI","regex":"^http://.*"},{"ircEvent":&quo
阅读全文
posted @
2012-08-06 12:14
秦岭过客
阅读(246)
推荐(0)
DataTable转Json方法
摘要:publicstaticstringCreateJsonParameters(DataTabledt){/**//**//**//*/*****************************************************************************WithoutgoingintothedepthofthefunctioningofthisMethod,iwilltrytogiveanoverview*AssoonasthismethodgetsaDataTableitstartstoconvertitintoJSONString,*ittakeseach
阅读全文
posted @
2012-08-04 17:48
秦岭过客
阅读(467)
推荐(0)