【jQuery TE——兼容IE6的轻量级文本编辑器插件】教程文章相关的互联网学习教程文章

兼容ie的jquery ajax文件上传【代码】【图】

Ajax文件上传插件很多,但兼容性各不一样,许多是对ie不兼容的,另外项目中是要求将网页内容嵌入到桌面端应用的,这样就不允许带flash的上传插件了,如:jquery uploadify。。。悲剧 对于Ajax文件上传,大体是有:  1、创建一个input type="file" 的文件上传按钮,根据其id监听绑定其change事件,在事件中用jquery创建一个iframe,嵌入添加隐藏form,同时创建input type="file",id相同的文件上传按钮,并传入其他需要提交的数据...

关于jquery的$ajax不兼容ie的问题

在做项目的过程中,经常碰到ie的不兼容问题,目前大部分问题主要集中在ie8、ie9这两款浏览器上。最近碰到的问题就是jquery的$.ajax方法不兼容ie9的问题。网上的方法是用jsonp或者cors跨域的方法来解决。首先 jsonp只能使用get请求,无法使用post请求,而cors跨域也只能解决部分问题。我尝试了几种方法都不行。最后使用XDomainRequest解决了问题。代码中应当引入 :<script src="js/jquery-1.9.1.min.js"></script><script src="j...

可兼容IE的获取及设置cookie的jquery.cookie函数方法_jquery

前言 在开发过程中,因为之前有接触过Discuz,就直接拿其common.js里面的getcookie和setcookie方法来使用,做到后面在使用IE来测试的时候,发现这两个方法子啊IE下不起作用,就请教同事,这样就有了jquery.cookie.js文件的由来,里面的代码很少,我贴在下面,方便以后使用和研究吧。 源码 代码如下: /** * Cookie plugin * * Copyright (c) 2006 Klaus Hartl (stilbuero.de) * Dual licensed under the MIT and GPL licenses: * h...

javascript-jQuery(&#039;#cancel&#039;).removeAttr(&#039;disabled&#039;);这句话IE不能兼容,你能给出兼容IE系列,FF,chrome的程序?

jQuery('#cancel').removeAttr('disabled');这句话IE不能兼容,你能给出兼容IE系列,FF,chrome的程序?回复内容:jQuery(#cancel).removeAttr(disabled);这句话IE不能兼容,你能给出兼容IE系列,FF,chrome的程序?jQuery('#cancel').prop("disabled",false); 参考:http://blog.sina.com.cn/s/blog_655388ed01017cnc.html

javascript-jQuery(&#039;#confirm&#039;).removeAttr(&#039;disabled&#039;);这样的写法不能兼容IE系列,请给出兼容任何浏览器写法?

jQuery('#confirm').removeAttr('disabled');回复内容:jQuery(#confirm).removeAttr(disabled);jQuery(#confirm).attr(disabled,false);$(this).prop('disabled', false); 1、jQuery(#confirm).attr(disabled,false); 2、jQuery(#confirm)[0].disabled = false;

兼容IE与firefox火狐的回车事件(js与jquery)_javascript技巧

javascript 兼容IE与firefox火狐的回车事件 代码如下: function keypress(e) { var currKey=0,e=e||event; if(e.keyCode==13)document.myform.submit(); } document.onkeypress=keypress; 代码如下: document.onkeydown=function(event) { e = event ? event :(window.event ? window.event : null); if(e.keyCode==13){ //执行的方法 alert('回车检测到了'); } } jquery 兼容IE与firefox火狐的回车事件 代码如下:$(document)....

JQuery自适应IFrame高度(支持嵌套兼容IE,ff,safafi,chrome)_jquery【图】

代码如下: function adjustIFramesHeightOnLoad(iframe) { var iframeHeight = Math.min(iframe.contentWindow.window.document.documentElement.scrollHeight, iframe.contentWindow.window.document.body.scrollHeight); $(iframe).height(iframeHeight); } 失败的测试就不说了,来直接的。 两个链接和iframe: 代码如下: 个人信息 修改密码 js代码: 代码如下: $(function(){ $("#c-c-iframe").load(function(){ $(this)....

禁止选中文字兼容IE、Chrome、FF等_jquery

代码如下: $(el).attr(unselectable,on) .css({-moz-user-select:-moz-none, -moz-user-select:none, -o-user-select:none, -khtml-user-select:none, /* you could also put this in a class */ -webkit-user-select:none,/* and add the CSS class here instead */ -ms-user-select:none, user-select:none }).bind(selectstart, function(){ return false; }); 根据上面分析 可以设置 你需要禁止选中文字区域的 css。如: 代码...

可兼容IE的获取及设置cookie的jquery.cookie函数方法

前言 在开发过程中,因为之前有接触过Discuz,就直接拿其common.js里面的getcookie和setcookie方法来使用,做到后面在使用IE来测试的时候,发现这两个方法子啊IE下不起作用,就请教同事,这样就有了jquery.cookie.js文件的由来,里面的代码很少,我贴在下面,方便以后使用和研究吧。 源码 代码如下:/** * Cookie plugin * * Copyright (c) 2006 Klaus Hartl (stilbuero.de) * Dual licensed under the MIT and GPL licenses: * ht...

JQuery为textarea添加maxlength属性并且兼容IE

// JQuery为textarea添加maxlength // textarea默认不支持maxlength属性。 // 通过JQuery的keyup事件: JQuery代码如下: 代码如下:<script type="text/javascript"> $(function(){ //IE也能用textarea $("textarea[maxlength]").keyup(function(){ var area=$(this); var max=parseInt(area.attr("maxlength"),10); //获取maxlength的值 if(max>0){ if(area.val().length>max){ //textarea的文本长度大于maxlength area.val(area...

JQuery自适应IFrame高度(支持嵌套 兼容IE,ff,safafi,chrome)

代码如下:function adjustIFramesHeightOnLoad(iframe) { var iframeHeight = Math.min(iframe.contentWindow.window.document.documentElement.scrollHeight, iframe.contentWindow.window.document.body.scrollHeight); $(iframe).height(iframeHeight); } 失败的测试就不说了,来直接的。 两个链接和iframe: 代码如下:<li><a href="selfinfo.jsp" target="c-c-iframe" title="个人信息" >个人信息</a></li> <li><a href="mod...

兼容IE与firefox火狐的回车事件(js与jquery)

javascript 兼容IE与firefox火狐的回车事件 代码如下:<script language="javascript"> function keypress(e) { var currKey=0,e=e||event; if(e.keyCode==13)document.myform.submit(); } document.onkeypress=keypress; </script> 代码如下:<script> document.onkeydown=function(event) { e = event ? event :(window.event ? window.event : null); if(e.keyCode==13){ //执行的方法 alert(回车检测到了); } } </script>jquery...

JS遮罩层效果 兼容ie firefox jQuery遮罩层

代码如下:<!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> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>史上最精简,最强大的JS遮罩层效果,支持ie firefox jQuery遮罩层</title> <script type="text/javascript" src="jquery-1.3.2.js"></script> <script ...

插件 - 相关标签