Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- setAttribute



  Solution to IE setAttribute style problem

In IE7, the JavaScript setAttribute("style","attributes") doesn't work, but it works in IE 8 and other web  browsers. To solve the STYLE problem in IE 7 we can use a workaround method.we can use element.style.cssText = 'color:#FF0000;';in IE 7 instead ofelement.setAttribute('style','color:#FF0000;'); ...

   JavaScript,Style,setAttribute, IE,Not work,Solution     2011-11-21 12:00:27

  Load and execute JavaScript

When we load and execute JavaScript in a webpage, there are many points we need to care about because of its design and feature. There are two features about JavaScript execution in a browser: 1). The JavaScript codes will be executed immediately once loaded;2). When JavaScript codes are being executed, they will block the following contents (including page rendering and other resources downloading). So if there are multiple js files to be loaded, these codes will be executed sequentially. Since...

   JavaScript,async,defer,load,execute     2013-06-07 04:53:46

  Understand Virtual DOM

With the popularity of React, the internals and implementation of Virtual DOM has becoming top discussed topic in tech communities and interviews. This post will give an introduction of Virtual DOM and how to implement a simple Virtual DOM logic. How to understand Virtual DOM In early days, front end developers would update a webpage view based on the data status change(usually after making AJAX call). But it brings performance penalties when there is frequent update as it would cause page reflo...

   JAVASCRIPT,DOM,VIRTUAL DOM     2019-12-07 23:43:04