opera

MAILTO max-length of each internet browsers?

懵懂的女人 提交于 2020-01-10 05:00:07
问题 Update: Two years before this question, a similar question was asked: Effective maximum mailto: body lengths as pointed out by Peter O. Luckily answers of both questions are complementary :-) Browsers evolved a lot in the last two years, therefore we can say this question is an update of the other one ;-) The specifications does not limit the mailto command length: RFC 6068 specification HTML 4 specification ( mailto command is an URL) (please see this SO answer, the answers of this SO

有没有一种方法可以检测浏览器窗口当前是否未激活?

人盡茶涼 提交于 2020-01-08 22:04:01
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 我的JavaScript会定期进行活动。 当用户不查看站点时(即窗口或选项卡没有焦点),最好不要运行。 有没有办法使用JavaScript做到这一点? 我的参考点:如果您使用的窗口未激活,Gmail聊天会播放声音。 #1楼 自从最初编写此答案以来,由于有了W3C,新的规范已达到 推荐 状态。 现在, 页面可见性API (在 MDN上 )使我们能够更准确地检测页面何时向用户隐藏。 document.addEventListener("visibilitychange", onchange); 当前的浏览器支持: 铬13+ Internet Explorer 10+ Firefox 10+ Opera 12.10+ [ 阅读笔记 ] 以下代码会退回到不兼容浏览器中不太可靠的模糊/聚焦方法: (function() { var hidden = "hidden"; // Standards: if (hidden in document) document.addEventListener("visibilitychange", onchange); else if ((hidden = "mozHidden") in document) document.addEventListener(

如何创建带有可点击标签的复选框?

陌路散爱 提交于 2020-01-08 10:34:17
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 如何创建带有可单击标签的HTML复选框(这意味着单击标签可以打开/关闭该复选框)? #1楼 它也可以工作: <form> <label for="male"><input type="checkbox" name="male" id="male" />Male</label><br /> <label for="female"><input type="checkbox" name="female" id="female" />Female</label> </form> #2楼 您还可以使用CSS伪元素分别从复选框的所有value属性中选择并显示标签。 编辑: 这仅适用于基于Webkit和基于眨眼的浏览器(Chrome(ium),Safari,Opera ....)以及大多数移动浏览器。 这里没有 Firefox 或IE支持。 仅在将webkit / blink嵌入到您的应用程序中时,这才有用。 <input type="checkbox" value="My checkbox label value" /> <style> [type=checkbox]:after { content: attr(value); margin: -3px 15px; vertical-align: top; white

how to set focus in required index on textbox for opera

安稳与你 提交于 2020-01-07 05:47:08
问题 i'm having a textbox where i need to set focus/ cursor at required index of the textbox in opera browser. 回答1: Working Demo function SetCaretPosition(elemId, caretPos) { var elem = document.getElementById(elemId); if(elem != null) { if(elem.createTextRange) { var range = elem.createTextRange(); range.move('character', caretPos); range.select(); } else { if(elem.selectionStart) { elem.focus(); elem.setSelectionRange(caretPos, caretPos); } else elem.focus(); } } } elemId: id of the element

Adding frames to an existing frameset using a userscript. Works with Firefox, why not with Opera?

人盡茶涼 提交于 2020-01-07 05:03:16
问题 Brock Adams gave me the code below (original question: How to add frames to an existing frameset using userscript?) to create a frame inside an existing frameset. It works fine with Firefox and Greasemonkey, but how do I make it work with Opera and Violentmonkey? var parent = document.getElementById ("mainset"); var child = document.createElement ("frame"); child.style = "background-color: pink;"; parent.appendChild (child); parent.rows = "30%,30%,30%" var docRdyInt = null; var frmCW = child

OperaProfile object and Selenium RC (C#)

爱⌒轻易说出口 提交于 2020-01-07 04:48:12
问题 I'm try to use selenium-server-standalone-2.33.0.jar with opera and need to change some profile preferences. It possible to create OperaProfile object in C# project and using it like this: OperaProfile profile = new OperaProfile(); // Error: Type or namespace 'OperaProfile' could not be found profile.preferences().set("User Prefs", "Ignore Unrequested Popups", false); DesiredCapabilities capabilities = DesiredCapabilities.Opera(); capabilities.SetCapability("opera.profile", profile);

How to fully close Opera browser via RemoteWebDriver

夙愿已清 提交于 2020-01-07 04:04:26
问题 I'm attempting to add Opera to a node on our Selenium Grid but running into a problem closing the Opera browser. In Opera, closing the last tab in a browser does not close the browser. It instead launches something called Speed Dial. This is apparently the default behavior in Opera. I've tried to disable Speed Dial but it doesn't appear to prevent this behavior. Due to the tests running via RemoteWebDriver, I can't just call a script on the Opera node to close the window. I've tried the

如何延迟.keyup()处理函数,直到用户停止键入?

六月ゝ 毕业季﹏ 提交于 2020-01-07 02:25:52
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 我有一个搜索字段。 现在,它会搜索每个键。 因此,如果有人键入“ Windows”,它将使用AJAX搜索每个键入的内容:“ W”,“ Wi”,“ Win”,“ Wind”,“ Windo”,“ Window”,“ Windows”。 我希望有一个延迟,因此它仅在用户停止键入200毫秒时才搜索。 在 keyup 函数中没有用于此的选项,我已经尝试过 setTimeout ,但是它没有用。 我怎样才能做到这一点? #1楼 延迟功能可在每次键入时调用。 需要jQuery 1.7.1或更高版本 jQuery.fn.keyupDelay = function( cb, delay ){ if(delay == null){ delay = 400; } var timer = 0; return $(this).on('keyup',function(){ clearTimeout(timer); timer = setTimeout( cb , delay ); }); } 用法: $('#searchBox').keyupDelay( cb ); #2楼 该函数从Gaten的答案中扩展了该函数,以使元素返回: $.fn.delayKeyup = function(callback, ms){ var timer =

JS security issue with Opera 11.01, after moving from server A to B

情到浓时终转凉″ 提交于 2020-01-06 19:48:14
问题 I have a outer HTML-document (subdomain1.server-a.de) with an iFrame and inner HTML-document (subdomain2.server-a.de). The inner script should send & receive AJAX-requests to subdomain2.server-a.de. I've set the document.domain-value for both documents to "server-a.de" - so far, so good, works well in all tested browsers (FF/Chrome/Opera). Now I move the scripts to server-b.de with same subdomains and set the document.domain on both documents to "server-b.de". That still works in FF and

使用时限制文件格式 <input type=“file”> ?

只谈情不闲聊 提交于 2020-01-06 15:32:17
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 当用户单击HTML中 <input type="file"> 元素中的 <input type="file"> 浏览”按钮时,我想限制可以从本机OS文件选择器选择的 <input type="file"> 。 我有一种感觉,这是不可能的,但我想知道是否 有 一个解决方案。 我只想保留HTML和JavaScript; 请不要使用Flash。 #1楼 如前面的答案中所述,我们不能限制用户仅选择给定文件格式的文件。 但是使用html中的file属性上的accept标签确实很方便。 至于验证,我们必须在服务器端进行。 我们也可以在js的客户端执行此操作,但这不是万无一失的解决方案。 我们必须在服务器端进行验证。 对于这些需求,我确实更喜欢struts2 Java Web应用程序开发框架。 借助其内置的文件上传功能,将文件上传到基于struts2的Web应用程序简直是小菜一碟。 只需提及我们希望在应用程序中接受的文件格式,其余所有内容都由框架本身的核心负责。 您可以在struts官方站点上进行检查。 #2楼 严格来说,答案是 否定的 。 开发人员 无法 阻止用户在本机OS文件选择对话框中选择任何类型或扩展名的文件。 但是, <input type = "file"> 的 accept