opera

通过div单击底层元素

南笙酒味 提交于 2019-12-07 18:46:29
我有一个具有 background:transparent 和 border 的 div 。 在这个 div ,我还有更多元素。 当前,当我在overlay div 之外单击时,我可以单击基础元素。 但是,当直接单击overlay div 时,我无法单击基础元素。 我希望能够单击此 div 以便可以单击基础元素。 #1楼 我要添加此答案,因为我在这里没有看到完整的答案。 我能够使用elementFromPoint做到这一点。 所以基本上: 将点击附加到您要点击的div 把它藏起来 确定指针在哪个元素上 点击那里的元素。 var range-selector= $("") .css("position", "absolute").addClass("range-selector") .appendTo("") .click(function(e) { _range-selector.hide(); $(document.elementFromPoint(e.clientX,e.clientY)).trigger("click"); }); 就我而言,覆盖div是绝对定位的-我不确定这是否有所不同。 此功能至少适用于IE8 / 9,Safari浏览器和Firefox。 #2楼 我需要这样做,并决定采用以下路线: $('.overlay').click(function(e){ var

Can safari/chrome/opera make ajax requests while an upload is in progress?

柔情痞子 提交于 2019-12-07 10:52:58
问题 Basically i am making a simple ajax request function upload(){ setInterval(function callMeOften() { $.ajax({ method: 'get', url : 'uploadinfo.php?unique_id=<?php echo $some_uniq_id; ?>', dataType : 'text', success: function(text){ updatebar(text); }, error: function (XMLHttpRequest, textStatus, errorThrown) { alert(XMLHttpRequest.status); alert(XMLHttpRequest.responseText); } }); }, 5000); } function updatebar(per){ $('#updateMe').animate({"width" : per}); } to a php script $unique_id = $_GET

browser-specific CSS for mobile browsers

回眸只為那壹抹淺笑 提交于 2019-12-07 08:10:11
问题 How do I make media queries for the different mobile browsers (like Opera Mobile and Firefox) on the Android? The CSS really breaks when I use certain browsers. 回答1: You can't directly wit CSS, but you can use // target mobile devices @media only screen and (max-device-width: 480px) { body { max-width: 100%; } } // recent Webkit-specific media query to target the iPhone 4's high-resolution Retina display @media only screen and (-webkit-min-device-pixel-ratio: 2) { // CSS goes here } // should

Changing button text with JavaScript doesn't work in Opera (11.11) for <input type=“submit” /> elements. Why?

浪尽此生 提交于 2019-12-07 02:50:14
问题 Why is that changing a button text doesn't work in Opera 11.11 for elements like <input type="submit" value="Asdasd" id="blahblah_button" /> ? (Didn't try it in earlier versions yet.) I tried it with jQuery and with "pure" JavaScript too, none of them worked. This is the jQuery code I tried: $('#blahblah_button').val('Blah-blah'); and this is the "pure" JS-code: document.getElementById('blahblah_button').value = 'Blah-blah'; Why is that none of them worked in Opera 11.11 ? It DOES work in IE,

常见的Web攻击手段——CSRF攻击

人盡茶涼 提交于 2019-12-07 00:26:48
一、什么是CSRF攻击? 跨站请求伪造(Cross-Site Request Forgery, CSRF),恶意网站通过脚本向当前用户浏览器打开的其它页面的 URL 发起恶意请求,由于同一浏览器进程下 Cookie 可见性,导致用户身份被盗用,完成恶意网站脚本中指定的操作。 尽管听起来跟XSS跨站脚本攻击有点相似,但事实上CSRF与XSS差别很大,XSS利用的是站点内的信任用户,而CSRF则是通过伪装来自受信任用户的请求来利用受信任的网站。 你可以这么理解CSRF攻击:攻击者盗用了你的身份,以你的名义向第三方网站发送恶意请求。 CRSF能做的事情包括利用你的身份发邮件、发短信、进行交易转账等,甚至盗取你的账号。 二、 CSRF攻击原理 CSRF的攻击原理如下图所示。 首先用户C浏览并登录了受信任站点A; 登录信息验证通过以后,站点A会在返回给浏览器的信息中带上已登录的cookie,cookie信息会在浏览器端保存一定时间(根据服务端设置而定); 完成这一步以后,用户在没有登出(清除站点A的cookie)站点A的情况下,访问恶意站点B; 这时恶意站点 B的某个页面向站点A发起请求,而这个请求会带上浏览器端所保存的站点A的cookie; 站点A根据请求所带的cookie,判断此请求为用户C所发送的。 因此,站点A会报据用户C的权限来处理恶意站点B所发起的请求

Is there a way to hide the new HTML5 spinbox controls shown in Google Chrome & Opera? [duplicate]

空扰寡人 提交于 2019-12-06 22:16:19
问题 This question already has answers here : Can I hide the HTML5 number input’s spin box? (14 answers) Closed 6 years ago . Google Chrome now, and Opera before, shows a "spin box" control beside a input field of type "number". I want to be able to style this, or hide it. Are there ways of controlling this UI element yet? EG: <-- That little ui element with an up and down arrow. It's not that functional and its adding unnedded elements to a form I've created. I understand I can just not have the

backbone源码学习中的知识点整理(一)

青春壹個敷衍的年華 提交于 2019-12-06 18:15:29
一、self var root = (typeof self == 'object' && self.self === self && self) || (typeof global == 'object' && global.global === global && global); 现代web之前的window.self和self 对于web页面,在默认状况下,下面4个写法都是等同的: window === self // true window.window === window.self // true window.self === self // true window.window === self // true 其实真实情况还就是这样,并没有需要self出场的理由,唯一可能有作用的就是更语义地判断当前页面是否作为iframe嵌入了,直接: parent === self // true表示作为iframe嵌入,false则表示被iframe嵌入了 在HTML5一些新特性出来之前,全局的self就是个没什么实用价值的半吊子。但是,随着HTML5一些新特性的到来,self开始慢慢登上正式的舞台,最常见的就是用在Service Workers或者Web Workers中。 无论是出来有段时间的Web Workers或者说是新晋宠儿Service Workers

Select in Opera doesn't close on change event

只谈情不闲聊 提交于 2019-12-06 16:26:48
In Opera (and only in Opera) I have strange behavior of select element. In change event, if I disable this select, it doesn't close (collapse). $('select').bind('change', function() { $(this).attr('disabled', true); }); Is it some known issue of opera? So far I haven't found anything. Use a short delay before disabling the select, 10ms should be sufficient Slava Rachek Setting disabled attribute did not work for me, but this code works: $('select').change(function() { $(this).hide(); var _this = this; setTimeout(function() { $(_this).show(); }, 1); }); Just hide select, and after one

IT兄弟连 HTML5教程 CSS3属性特效 小结及习题

半世苍凉 提交于 2019-12-06 14:12:57
本章小结 CSS3新增了许多属性,CSS3样式新增了一种颜色模式rgba用来制作透明色,比CSS的颜色模式多了一个透明度的设置。文字的CSS3特效有文字阴影、文字描边、文字排版和文字省略等。另外,CSS3增加了弹性盒模型,我们可以为盒模型增加阴影和倒影。CSS3的分栏布局让WEB开发人员轻松的让文本呈现多列显示。传统的圆角生成方案,必须使用多张图片作为背景图案。CSS3的出现,使得我们再也不必浪费时间去制作这些图片了,仅需要通过设置border-radius属性即可。通过CSS3,我们能够创建圆角边框,向矩形添加阴影,使用图片来绘制边框。CSS3 Gradient分为linear-gradient(线性渐变)和radial-gradient(径向渐变)。CSS3规范中对背景这一部分,新加入设定多个背景图片、指定背景大小、设置背景渐变等功能。遮罩提供一种基于像素级别的,可以控制元素透明度的能力,类似于png24位或png32位中的alpha透明通道的效果。transition允许CSS的属性值在一定的时间区间内平滑地过渡。2D变换和3D变换能够对元素进行移动、缩放、转动、拉长或拉伸。制作动画需要使用animation属性,执行动作需要由关键帧@keyframes来控制。 本章习题 1.在CSS中,注释代码是(B) A.<!--> B./**/ C.// D.|| 2

FB.login callback not working on Opera Mobile browser

半城伤御伤魂 提交于 2019-12-06 13:55:35
I am testing our web application on OPera Mobile. We have a signIn through facebook link. It takes me to the login page, but after I enter my ID and password nothing happens. If I click on the login button mutliple times, it gives me too many failed attempts error. But after this my facebook account seems to be logged in. If I login to facebook and come back to our application and click on login, nothing happens, I see a blank page. After I did Javascript debug, I could see that the FB.login() callback is not running at all. Can any of you tell me what could be the reason? Thanks, Yamini