default behavior onlyvar preventdefault = function (e) { e = e | | window.event; if (e.preventdefault) { e.preventdefault (); } else{ e.returnvalue = false; }}Get Event Source Objectvar geteventtarget = function (e) { e = e | | window.event; var target = event.srcelement? Event.srcElement:event.target; return target;}Attached: Binding Onpropertychange event Onpropertychange, which is triggered when an element's attribute changes, is typically used to capture its valu
Background:In today's work process, interrupt point debugging Follow up a section of JS code execution, the interface using Jquery.open Open, Ok () event no corresponding button, front-end Web Interface Click button, unable to cut into the breakpoint statement.Workaround: Use DebuggerEnter debugger in the OK () functionFront-end Interface Click OK button, the service program does not start debugging (server vs directly Open is the site, the site directory is the source code,)Press F10 to debug,
Once in a while, the computer browser can not open the usual Web page , it is strange that ie may open other than the browser can not , the results Baidu a bit, find a post, personally test it, if you can solve, record as follows:(1) Start-run-Enter cmd-OK-enter netsh winsock reset and press ENTER to determine. and then reboot.(2) If you are prompted for administrator status:That's because you don't have administrator privileges, win7 system opens C:\Windows\System32.(3) Find Cmd.exe, right-clic
Enter the following code in the console and press ENTER, and console displays "function (A, b) {return new M.fn.init (A, B)}" to indicate that the import was successful and that the jquery function could be executed directly in the console.var jq = document.createelement (' script '); = ' Http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js ';d ocument.getelementsbytagname (' head ') [ 0].appendchild (JQ); Jquery.noconflict ();Introducing jquery in the
1, solve ExtJS 3 chrome on the grid cm dislocation problem, this is a ExtJS bug
Problems like the picture below
2. Solutions The official
http://www.sencha.com/forum/archive/index.php/t-198124.html?s=782e3297b3794980e855431bf90e6172
Ext.grid.ColumnModel.override ({
gettotalwidth:function (includehidden) {
var off = 0;
if (ext.ischrome) {off
= 2;
};
if (!this.to
Today, when developing a Web application, write a small function with Javascipt to do the following things:
That is, change the Bille coefficient, the back of my hospital accounted for automatically change. The function is very simple, with onchange= "" can be implemented, but my code is as follows:
Code 1:
wyzb("Wyzb This is to call JS code, JS code is as follows:
Code 2:
But the Web page just does not execute this JS code, with the Chrome
In Ie7/firefox 3.0/google Chrome passed the test
Closedemo.htm
Copy Code code as follows:
Attention
If you are using a Firefox browser you must make the following settings
1, in the Address bar input about:config and then enter, warning confirmation
2, enter "Dom.allow_scripts_to_close_windows" in the filter, double-click to set this value to True
can be completed.
Test comparison good code: feel netizens reply
When a sync-mode Ajax load results in a DOM operation being suspended, the browser with this problem has chrome,ie8,9, etc. (Unknown test),
Example:
The code is as follows
Copy Code
Dialog = New dialog ({}). open ();Sync mode of Ajax$.ajax ({URL: "Some/url",Async:false,//Load data with Sync callOther params});
In the above code, dialog is a dialog object, normally it should be a pop-up dialog, and then execute A
Today, adjust the pop-up layer, encountered a small problem: get scrolltop value?
On the Internet to see some of the high way to get the page was rolled, document.body.scrollTop in IE FF is 0, the strange is in Chrome can.
I guess FF to be closer to IE, I used the FF 13.0.1, can be used in the previous version, this skip ...
The code is as follows
Copy Code
S + + "Web page is rolled high (FF):" + document.body.scrollTop;
The above article has outlined the specific aspects of the console object as well as the basic application, here is a brief description of how to use the Chrome console this artifact to properly debug the JavaScript code (this is what we can really use to implement the place)
1, first say the source positioning
Everyone open the test page to see the bottom right side of the page there is a recommended icon? Right-click the recommended icon, select t
This article describes the JS implementation compatible with IE, FF, Chrome, opera and Safari music players. Share to everyone for your reference. The implementation method is as follows:
/** Music player * @param obj player ID * @param file Audio file mp3:ogg: * @param loop whether loop/function Audioplayer (ID, file, lo
OP) {var audioplayer = document.getElementById (ID);
if (audioplayer!=null) {document.body.removeChild (Audioplayer); }
Firefox and IE's browser to achieve the input history of the function, can simplify the trouble of input, but sometimes pop-up drop-down box will block the page display content, and in some cases also do not need to record the input box, such as the number of query input box, Users do not query the same number multiple times, there is no need to let the browser record.
MSIE has customized the extended attribute AutoComplete of input, and set it to off
Using this method to mask Msie,firefox,
In the use of jquery processing HTML5 application, has been under the Firefox test is normal, users use pad to visit when said there are garbled,I tried it. Sure enough, after the discovery of chrome and IE kernel is the problem, this problem set the page properties for Utf-8 time, only Firefox is the Charset=utf-8 header fileChrome and IE are not specified, so there is a garbled problem.
Workaround:
The code is as follows
Copy Code
Using Nutz to build a server, follow the tutorial you wrote to find this error:
then I found out that the tutorial missed the web.xml problem, but when I added it, I still couldn't access the site ... The port is already in use, but the ping is not working, and the last thing to find is that the6666 port is one of the chrome default unsecured ports , so the lucky numbers are not safe ... The error message is the smallest line of text in the previous
If you need to print the current page directly, then you don't have to look down, just use "print" in the toolbar that comes with your browser. If your actual need is to display a lot of content on the page, but you just want to print the contents of the specified area, and further may want to put together the content that was originally displayed, divided into several pages to print, then this article hopes to provide a minimalist solution.
The implementation of the method is very simple, the d
Ubuntu 14.04 installs the chrome, opens the webpage, the page displays the Chinese no question, the label page Chinese garbled. As follows:
Although it does not affect the use, but always feel a little uncomfortable.
Workaround:
It's really simple, just execute the command:
sudo vim/etc/fonts/conf.d/49-sansserif.conf
You can save the file by modifying the font for the fourth line of the file to Ubuntu. The following figure:
Source: Blog.csdn
Tools:
ChromeProcess:1, open the chrome press F12. Will pop up the Developer Tools window. Click on the network to observe the Web page of the visit.2, open the Web page:http://www.ximalaya.com/#/1000202/sound/3613735, click the Play button and start playing the audio.3, at this time in the Network Output window will see a variety of information there is such a record of accessHttp://www.ximalaya.com/tracks/3613735.json
Its return result isThe code
Tags: span struct return over cannot call ONS testEmmm ... See the parent-child relationship directly by testing: class a{Constructor () {//does not have to
This. Name= "Class_a"; //Console.log (This)//a {name: "Class_a"} (another line) B {name: "Class_a"}//the parent class subclasses performed a
} static Staticcallnamea () {return"Name_a"; } Callnamea () {return"Name_a"; } static cover () {return"Cover_a"}} class B extends a{constructor () {//subclasses can not addSuper ();//subclasses
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.