Now more and more browsers, such as IE, Firefox, Chrome, Safari and so on, so now to achieve a JS copy content to the Clipboard small function is not so easy.
in the Flash 9 era, there is a program that kills all of the browser's JS copy content to the Clipboard :
This program is one of the most popular methods: the famous clipboard copy solution utilizes a clipboard.swf as a bridge to copy content to the Clipboard.
The principle is: Create a hidden Flash file, and give the Flash variable fla
This code was previously used to prevent the page from using the IFRAME
Copy Code code as follows:
But in Firefox you will find that the page will be constantly in the brush. The page doesn't work at all.
Here is because the Firefox windows.top if not so is empty, under IE windows.top is this window page constantly refresh the running of this section of JS code This creates a dead loop, is why the page has been refreshed.
So I changed the way that the following code is
It is very simple to determine if a carriage return is pressed:
Copy Code code as follows:
function enterpress () {
if (Event.keycode = = 13) {
...
}
}
IE6 's onkeypress will accept the "carriage return event" and onkeydown will not accept
IE8 onkeypress will not accept the "carriage return event", and OnKeyDown will accept
... Don't dwell on it, two of them.
Copy Code code as follows:
However, under the FF, there will be contradictions. FF i
This article describes the JS compatible PC-side browser and has a variety of pop-up tips for mobile phone-side floating-layer control. Share to everyone for your reference. Specifically as follows:
Full instance code click here to download the site.
Usage
or call it in jquery:
Inheriting class alert and confirm hints (in jquery mode):
Html:
Js:
$ (' #btn_alert '). Click (function () {
$.alert ('
For the most part, it is possible to use the ActiveX control method, but this scenario applies only to IE browsers. In order to be compatible with different browsers, such as Firefox, we need to consider a more general approach. This method we can refer to "in many sites, will be in a page somewhere to a link to directly start QQ to chat." This method enables the Web system to invoke an EXE file on the client computer (provided that the required EXE a
Windows Self-band method
Window.close ()
The code is as follows
Copy Code
This approach is a lot of problems, incompatible is not more introduced, the following we look at an example
Window.close () is OK, but it will give you a hint. The page you are viewing is attempting to close the window. Do you want to close the window? "How can you not eject this hint?""If you open this page for the first time, Window.close () will pop-up prompts, if this page is
Copy Code code as follows:
intercepts the string length. Supports Utf-8 and gb2312 encodings. If for gb2312, first turn it into Utf-8, intercept on utf-8 basis and then convert back
function cut_string ($str, $from =1, $length =10, $code = ' utf-8 ', $rear = ' ... ') {
if ($code!= ' utf-8 ') {//Always convert string to UTF-8 encoding
$str =iconv ($code, ' utf-8 ', $str);
}
$str _len=mb_strlen ($str, ' utf-8 ');//Length of string
if ($from > $str _len) {//If the Intercept start positio
[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, will point to that default parameter.
Because
]) {
global[' file ' +querytoken].percent=n;
} else{
global[' file ' +querytoken]={
token:querytoken,
percent:n
}
};
Console.log (n);
});
Continue polling.
Pretty, that's exactly what happened! Seen in Chrome and HTML5 's progress an effect, only in the IE789 will be a little cotton feeling, but still can see the detailed progress of the value; after all, old browser body bones do not, you understand; and, each upload to the value of the global plug, how to
After the grab test, the Fckediter object did not submit any data at all
After multiple browsers (Ie7,ie6,mathon), it is found that this problem only appears in IE8
The source estimate is that IE8 has a resolution problem with Microsoft's AJAX. NET 2.0 version
The problem features are as follows:
The system is generated by the MasterPage page, which is placed in the Fckediter control
Use Ajax to include the Fckediter control;
The first normal access to the page, Fckediter can submit the data nor
Compared with Flash, the new technology using HTML5 can improve the loading speed of the program. However, in the current situation, HTML5 feature support is not high, the availability of plug-ins is really narrow. For example, the new features I use in Plug-ins are:
Multiple properties of the
File and FileList APIs
XMLHttpRequest2 's upload and onprogress.
FormData
Take file, IE9 are not supported, so in the current environment IE series Browser can hardly use. Therefore,
/dn423948%28v=vs.85%29.aspx. But there is no explanation for the typeof. If we use the following code to detect, it's OK.
Alert ("ActiveXObject" in Window)//returns false under Ie11
This is what I don't understand. The "ActiveXObject" in Window returns True, and why did the previous decision that IE's code returned false in IE11? ask Daniel again for an explanation. Thank you for the following directly give a compatible IE11 to judge IE and non IE
The Perfect browser-compatible
HR:
height:1px;
Border:none;
border-top:1px solid Black;
margin:0;
*margin:0 0-14px 0;
Float:none;
*float:left;
Display:block;
The 1.hr element is a block-level element that is a box that has border
2. Height:
sizeAnd
Style.height.IEAnd
FirefoxThe size is interpreted and calculated differently, so it's best not to
sizeUse
Height, but there will be a border
Box, so will
Border:none.
FirefoxIt's under.
sizeIt
Mac Starter Tutorial: USB disk Format compatible win and OS X how to set? In the current environment, users often interact with Win and OS X, with the following scenarios:
(1), the need for long-term storage of data, less interaction;
(2), frequent interaction, the file is completely less than 4GB;
(3), frequent interaction, the majority of files greater than 4GB.
In the first case, it is recommended that you use the NTFS format, because it is mor
progress while burning, then the burner will automatically pop up and then shut down again (if you're using a laptop, you have to manually press the disc into the burner), and IMG starts checking.When the checkout is over, ImgBurn will send a less-than-friendly signal to you (you can delete the sound file, or replace it with your favorite), and it will also pop up the corresponding dialog box. Ok! It's done now!To me, ImgBurn is really a fool-like procedure. It is not only free, efficient, but
Tags: style blog http color using OS IO strongGeneral Rights Management System has a general-purpose paging query function, which can realize a variety of database query, support multi-table related paging query, is currently the most complete paging function implementation.The following code is the method used:///////////////////////////////Background Code 1///////////////////////////////Background Code 2///////////////////////////////Background Code 3///////////////////////////////Background C
Sharing a very good JavaScript implementation can be minimized, can close the floating ad window in the lower right corner of the effect, you can scroll with the scroll bar and keep it in the lower right corner of the fixed position. Basically compatible with all browsers (including IE Firefox Google browser and Apple browser )! See the advertisement in the lower-right corner of the website ~) :
The floating advertisement effect (
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.