源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

jquery 问答知识整理

  • 时间:2021-04-25 08:22 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:jquery 问答知识整理
获取ID : $(this).attr("id"); :not用法 1. 列表用法
[url=http://www.cnblogs.com/RuiLei/admin/onenote:#JQuery§ion-id={7D49242A-A98A-4774-B0E2-FDA3132A5302}&page-id={E983F464-FA7D-451A-B9C1-F7734D7CA29B}&object-id={3846621A-575D-08B5-3E89-C4A8BFD71782}&3B&base-path=F:\%E6%8A%80%E6%9C%AF.one]Issue 2091:[/url][url=http://www.cnblogs.com/RuiLei/admin/onenote:#JQuery§ion-id={7D49242A-A98A-4774-B0E2-FDA3132A5302}&page-id={E983F464-FA7D-451A-B9C1-F7734D7CA29B}&object-id={3846621A-575D-08B5-3E89-C4A8BFD71782}&40&base-path=F:\%E6%8A%80%E6%9C%AF.one]window.resizeTo() doesn't have any[/url] effect [list] [*][b]By Design we don't support resize/move for tabs, only constrained windows.[/b] [/*][/list] [quote] [url=http://www.cnblogs.com/lonz/articles/381022.html]http://www.cnblogs.com/lonz/articles/381022.html[/url] [/quote] [list] [*][b]javascript resizeTo bug[/b] [/*][/list] [quote] [url=http://code.google.com/p/chromium/issues/detail?id=11523]http://code.google.com/p/chromium/issues/detail?id=11523[/url] [/quote] [list] [*][b]在google chrome/safari 中textbox默认是可以自由拉长的,为何控制不让其自由拉长。[/b] [/*][/list] [url=http://www.1sucai.cn/upload/2010-2/20100211130549847.png][img]http://files.jb51.net/upload/2010-2/20100211130549660.png[/img] [/url] 解决方案: [quote]
CSS to disable resizing

textarea {
resize: none;
}
<textarea name="foo">

textarea[name=foo] {
resize: none;
}

HTML is <textarea id="foo">)

#foo {
resize: none;
}
[/quote]   [list] [*][b]JS压缩工具[/b] [/*][/list] [quote] [url=http://www.brainjar.com/js/crunch/demo.html]http://www.brainjar.com/js/crunch/demo.html[/url] 缺点: 会把正则表达式中类似*/去除 Sample: value = s.replace(/^0*/, ''); After Compress: value = s.replace(/^0, ''); [/quote] [list] [*][b]parseInt() 和 Number() 兩個函數有什么不同?[/b] [/*][/list] [quote] [url=http://hi.baidu.com/iloverobot/blog/item/bd3ed651ffd362868c5430bf.html]http://hi.baidu.com/iloverobot/blog/item/bd3ed651ffd362868c5430bf.html[/url] [/quote] [list] [*][b]JSON 问题[/b] [/*][/list] [quote] [url=http://blog.csdn.net/chinaontology/archive/2007/12/30/2004871.aspx]http://blog.csdn.net/chinaontology/archive/2007/12/30/2004871.aspx[/url] [/quote] [list] [*]CSS置底的提示框 [/*][/list] [url=http://www.1sucai.cn/upload/2010-2/20100211130549294.png][img]http://files.jb51.net/upload/2010-2/20100211130549706.png[/img] [/url] [url=http://www.1sucai.cn/upload/2010-2/20100211130549421.png][img]http://files.jb51.net/upload/2010-2/20100211130549993.png[/img] [/url] [list] [*][b]大文件上传 进度条显示 (仿csdn资源上传效果)[/b] [/*][/list] [quote] [url=http://www.cnblogs.com/zengxiangzhan/archive/2010/01/14/1647866.html]http://www.cnblogs.com/zengxiangzhan/archive/2010/01/14/1647866.html[/url] [/quote] [list] [*][b]可编辑的Input[/b] [/*][/list] [quote] [url=http://acme.com/javascript/]http://acme.com/javascript/[/url] [/quote] [url=http://www.1sucai.cn/upload/2010-2/20100211130549389.png][img]http://files.jb51.net/upload/2010-2/20100211130549568.png[/img] [/url] [list] [*][b]jquery设置html头信息[/b] [/*][/list] [quote] [url=http://home.phpchina.com/space.php?uid=155537&do=blog&id=182698]http://home.phpchina.com/space.php?uid=155537&do=blog&id=182698[/url] [/quote] [list] [*][b]jQuery与prototype(ajaxpro)冲突的解决方法[/b] [/*][/list] [quote] [url=http://www.cnblogs.com/sxlfybb/archive/2009/06/04/1495995.html]http://www.cnblogs.com/sxlfybb/archive/2009/06/04/1495995.html[/url] [/quote] [list] [*][b]利用jQuery + Handler(ashx) + LINQ 實現 Autocomplete[/b] [/*][/list] [quote] [url=http://www.dotblogs.com.tw/puma/archive/2009/03/10/7426.aspx]http://www.dotblogs.com.tw/puma/archive/2009/03/10/7426.aspx[/url] [/quote] [list] [*][b]jquery ajax 中文乱码[/b] [/*][/list] [quote] [url=http://phpxiaoxin.javaeye.com/blog/350544]http://phpxiaoxin.javaeye.com/blog/350544[/url] [/quote] [list] [*][b]Ajax中文乱码原因分析及解决方案[/b] [/*][/list] [quote] [url=http://hi.baidu.com/sihillver/blog/item/4d6f32f592920325bc3109d7.html]http://hi.baidu.com/sihillver/blog/item/4d6f32f592920325bc3109d7.html[/url] [/quote] [list] [*][b]打造基于jQuery的高性能TreeView[/b] [/*][/list] [quote] [url=http://kb.cnblogs.com/page/50337/]http://kb.cnblogs.com/page/50337/[/url] [url=http://kb.cnblogs.com/page/53517/]http://kb.cnblogs.com/page/53517/[/url] [/quote] [list] [*][b]利用jQuery实现更简单的Ajax跨域请求[/b] [/*][/list] [quote] [url=http://kb.cnblogs.com/page/53433/]http://kb.cnblogs.com/page/53433/[/url] [/quote] [list] [*][b]Jquery.Ajax 读取XML[/b] [/*][/list]
[quote]
first of all sorry about my english, it's not my native lengauge...
i have a xml file that i'm reading with the sample code above... 
but when i try to read it from a service web page ([url=http://www.google.com/ig/api?weather=Buenos%20A]http[/url]://www.google.com/ig/api?weather=Buenos%20A...), 
it doesn't show anything... and if i write the same content of this page in a xml file in my pc, 
[/quote]
[quote]
it works perfectly... i dont know what am i doing wrong
i let u the code that i'm using maybe u could help me
function clima(){
$.ajax({
  type: "GET",
  url: 'http://www.google.com/ig/api?weather=Buenos%20Aires',
  dataType: "xml",
  success: function(data){
  var $weather = $(data).find('current_conditions')
   console.log($weather);
  }
 });
}

function clima() {
$.ajax({
  type: "GET",
  dataType: "xml",
  url: 'http://www.google.com/ig/api?weather=Buenos%20Aires',
  success: function(xml) {
  var weather = $(xml).find("current_conditions").find("temp_c").attr("data");
   alert("Prognostico para hoy: " + weather + " grados");
  }
 });
}
[/quote]
  [list] [*][b]FullSize:一个新的IMG标签属性(附带JQuery实现)[/b] [/*][/list] [quote] [url=http://css9.net/img-fullsize/]http://css9.net/img-fullsize/[/url] [url=http://images.cnblogs.com/cnblogs_com/RuiLei/WindowsLiveWriter/JQueryQA1_FDA4/clip_image005_2.png][img]http://files.jb51.net/upload/2010-2/20100211130549660.png[/img] [/url] [url=http://css9.net/wp-content/uploads/2009/04/fullsize/example.html]http://css9.net/wp-content/uploads/2009/04/fullsize/example.html[/url] [/quote] [b]有关于$.ajaxSetup和$.get的问题[/b] [quote] 在Common.js中使用
  $.ajaxSetup({
    url: "…..",
    type: "POST",
    cache: true,
    dataType: "json"
  });
  $.ajax({
    data: { cityCode: cityCode, flag: flag },
    success: function(areaList) { …}

  });
在PageA页面引入Common.js    然后在脚本段中使用[b] $.get(url);[/b]   此处url调用的是一个aspx页面,显示结果为无数据加载!(正常情况:有数据加载。)   然后经过使用IE8的开发人员工具,进行Trace Error.最终发现原因错误信息(如下)   "Invalid JSON: <form name="form1" method="post" action="ajax_select 那么如何解决呢? 原因:         肯定是请求数据类型有问题? 解决方案:         1.在Page A 页面脚本段 [b]$.get(url,“html”);  [/b] [b]          因为$.get中的Data是可选项,现在确定原因之后,我们就来预定义好DataType[/b] [b]       [/b][b]结果:OK[/b] 分析源由:      是因为$.ajaxSetup是用全局设定的,所以全局已经设定了DataType:JSON了。    [b]  那Page A 页面的$.get()肯定受及影响。[/b] [url=http://www.1sucai.cn/upload/2010-2/20100211130549495.png][img]http://files.jb51.net/upload/2010-2/20100211130549990.png[/img] [/url] 最终解决方案:     改Common.js,去掉ajaxSetup全局设定        $.ajax({ url: "…..", type: "POST", cache: true, dataType: "json",data: { cityCode: cityCode, flag: flag }, success: function(areaList) { …} });     [b]结果:OK[/b]      [url=http://www.1sucai.cn/upload/2010-2/20100211130549617.png][img]http://files.jb51.net/upload/2010-2/20100211130549835.png[/img] [/url] [/quote]
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部