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,
CentOS6.5 install the latest firefox version
In the current centOS6.5 installation CD, the firefox web browser version is too old, and it is an e-hpc version, that is, it cannot be automatically updated, this will cause the system to be installed, the default version of 17.0.10 is significantly different from the new version. For more information, see:
We can solve this problem by uninstalling the old
Find: Ctrl+f
Find again: F3
Enter Find Link: '
Enter find text:/
Find: Shift+f3
Web search: Ctrl+k or Ctrl+e
Firefox shortcut key Navigation class:
Back: ALT + LEFT ARROW key or Backspace
Forward: Shift+backspace or ALT + RIGHT ARROW key
Home: Alt+home
Open File: Ctrl+o
Reload: F5 or Ctrl+r
Reload (ignoring cache): Ctrl+f5 or Ctrl+shift+r
Stop: ESC
Firefox shortcut key Editing class:
Copy: Ct
Compatibility between IE and Firefox
From: http://blog.csdn.net/powerglover/archive/2009/01/15/3789631.aspx
1. Event ProblemsIn IE, we can directly use the event variable, but in Firefox, because the event is a local variable, in Firefox, We can bind the event to an element, for exampleTo be compatible with both IE and FirefoxCodeObtain the event.VaR theevent
JS compatibility Summary for IE and FirefoxAugust 11:39 Thursday by CottageLabel:Browser Method Properties IT notationI. Differences in functions and methods1 . GetYear () method"Analysis Notes" first look at the following code:var year = new Date (). GetYear ();document.write (year);The date you get in IE is "2010", and the date you see in Firefox is "110", mainly because the getYear returned in Firefox is
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
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.