Solve the problem of incompatibility between IE and Firefox for event source
The code is as follows
Copy Code
function GetEvent (){if (document.all){return window.event;}Func=getevent.caller;while (Func!=null){var arg0=func.arguments[0];if (arg0){if ((arg0.constructor==event | | arg0.constructor ==mouseevent)|| (typeof (arg0) = = "Object" arg0.preventdefault arg0.stoppropagation)){return arg0;}}Func=func.caller;}return n
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]
Find Document.body.onclick = function (evt),
In IE, this evt is not, but under the Firefox (opera seems to be) will pass this parameter by default. In IE, this parameter is null, want to be compatible, just write.
Continue downward,
EVT = EVT | | window.event;
In IE, EVT will point to: Window.event, under Firefox,
1 after the operation, the following error occurredSelenium.common.exceptions.WebDriverException:Message: ' geckodriver ' executable needs to BES in PATHInformation display geckodriver needs to be in the PATH environment variableWorkaround:Download Geckodriver, Address: https://github.com/mozilla/geckodriver/releasesLocate the download directory and add the Geckodriver.exe installation path to the path; typically put geckodriver.exe in the Python installation directory2 as the above method is mo
/********************************************************************* * Author:samson * date:11/15/2014 * Test PL Atform: * 3.13.0-24-generic * GNU bash, 4.3.11 (1)-release * *********************************** ********************************/When you encounter no Flash plug-in when browsing to the official website to download one:http://get.adobe.com/cn/flashplayer/The download is: install_flash_player_11_linux.i386.tar.gzThen unzip the package, and then follow the usual first look at the Rea
How to modify the theme background of Firefox browser under WIN8 system
The specific methods are as follows:
1, open the Firefox browser add-on components;
2, in the additional component page can see the selected theme of the column, click on the column name after the view of all the buttons;
3, click to enter the theme Selection page, from the picture to see, a lot of themes, th
Now, in a well-known web browser, Firefox should be the first to join the reading mode, but to use this feature also need to activate it. First enter the command "About:config" in the Address bar, and press the ENTER key to pop up a set prompt window. Click on the "I'll be Careful,i promise" button and go into the Firefox browser settings screen. Enter the parameter name "reader.parse-on-load.enabled" in th
Look at the title should know what the software is to be introduced today. Yes, boring recently the computer to recharge, before the most nerve-racking is the driver installation, now the biggest headache is the browser data and expansion suite of the restoration, although the Firefox or Chrome has a cloud backup function, but still not very reassuring, How do you keep the data on your hard drive? Let Mozbackup help you!
Opera's content interception function is quite good, you can remove a lot of flash animation and picture ads, I have always felt that opera's advertising interception and pride of the blacklist is the list of features are first-class, is the browser's best advertising interception master.
Today, I saw a Firefox advertising interception skills, I installed the next Firefox, and practice the next, feel this
Recently in a script to try an automatic punch, found a few questions, hereby recorded.Environment:Ubuntu 12.04.4 LTSSelenium 2.43.0Firefox 32.0.31 Originally the machine Selenium,firefox are installed, but Firefox updates from time to time, so selenium may not support the current version of Firefox.Update Selenium command:sudo pip install-u Selenium2 python script used:1 #!/usr/bin/env python2 3 ImportSYS4
Browsers have their own caching mechanism, the general CSS and pictures will be cached locally, so that our modified CSS will not see the effect, each time to clear the cache, and then refresh to see the effect, so that the operation is too troublesome. Under IE we can directlyTo change the settings of the Internet Options/general/browsing history/To Temporary Internet Files option, the newer version of the Web page will be checkedThis is changed to check each time you visit this page. So we don
version of the system is installed OPENJRE2, if not installed by the following command installation:opensuse:~ # Zypper Install JAVA-1_8_0-OPENJDK3. Add Browser plugin icedtea Java Web Start (alternative to Javaws)opensuse:~ # Zypper Install Java-1_8_0-openjdk-pluginThrough the above settings, you can run the Java program directly through the Firefox browser for remote management.4, Opera Chromium browser may not be associated with this plugin, no re
1.8.0_151 version of the system is installed OPENJRE2, if not installed by the following command installation:[Email protected]:~# apt-get Install Openjdk-8-jre3. Add Browser plugin icedtea Java Web Start (alternative to Javaws)[Email protected]:~# apt-get Install Icedtea-netxThrough the above settings, you can run the Java program directly through the Firefox browser for remote management.4, Opera Chromium browser may not be associated with this plu
Usually for compatibility with IE and Firefox, the general event handling method is:
Copy Code code as follows:
Btn.onclick=handle_btn_click;
function Handle_btn_click (evt) {
if (evt==null) evt=window.event;//ie
Handle the event.
}
For simple programs, this is not a hassle.
But for some complex programs, a write function is not directly linked to the event. If you want to pass the event to this parameter, then all the
1. All code in Firefox that uses event-related is not available.
Event is the global object that IE encapsulates, control all events, but this object does not exist in Firefox, so it cannot be used in Firefox, especially Event.keycode is also unable to obtain.
Workaround:
The following JS encapsulates the event object, directly in the page reference, the original
Make the FileUpload control appear the same in IE and Firefox
The ASP.net fileupload control has a width property that can be used to set the height of the FileUpload control, and there is no problem with IE. But not in Firefox, the width of the FileUpload control is still the default value.
The root cause is that Firefox does not ignore the width property of the
Has published about this CSS compatible hack article more than one, but there are too many, have been invalidated, again released, do not want to talk about what a mess of the theory, directly on the example! As follows:IE browser can recognize "*" "\9", standard browser (such as FF) does not recognize "*";IE6 can recognize "_" "+" "#" "@", the same attribute has two only look at the latter, whether or not if it is two words it can recognize the "!important";IE7 can recognize "+" "#" "@" "!impor
We should have heard livestyle this dongdong, is Sublime Text an extension, with the Chrome livestyle extension can achieve real-time web page effect. But I have been accustomed to using Firefox, but Firefox Wood has livestyle (if there is, please know the recommendation of a friend-to cooperate with Sublime Text) How to do? Chatting with friends about AutoHotkey, suddenly thought why not AutoHotkey to achi
What is FirebugHaving been working on web development for several years, it is increasingly felt that there is a higher demand for web development now. To write beautiful HTML code, to write elegant CSS stylesheet to show each page module, to debug JavaScript to add some more lively elements to the page, to use Ajax to bring the user a better experience. A good web developer needs to be more level-able to deliver an equally good job. In order to help the vast number of developers in the Web2.0 t
Article Description: Firebug1.10 version of the official version of the Firefox 13~16 compatible release.
After 12 Alpha and 4 beta releases, the Firebug team finally released the Firebug 1.10 official edition,
compatible with the Firefox 13~16 version.
This release fixes 214 of issues (including 79 enhancements) and more than 50 automated tests to ensure a stable version. The new features i
Recommend a Firefox plug-in--html VALIDATOR (based on Tidy), now is version 0.79, installed on the plugin, in Firefox is very easy to test your HTML code, download here: http:// Users.skynet.be/mgueury/mozilla/download.html, FF will be installed online, restart ff, ie download files after copying to the Firefox installation directory under the Extensions folder,
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.