IE 與 Firefox 在 JavaScript 中有不少差異。常見的例子包括:
- float 樣式:IE 使用 styleFloat,Firefox 使用 cssFloat
- 推算樣式:IE 使用 currentStyle,Firefox 使用 getComputedStyle
- class 屬性:IE 需用 className,Firefox 可用 class
- label for:IE 使用 htmlFor,Firefox 使用 for
- 滑鼠座標:IE 常用 clientX,Firefox 常用 pageX
- 視窗尺寸:IE 使用 documentElement.clientWidth,Firefox 使用 innerWidth
- 透明度:IE 使用 filter alpha,Firefox 使用 opacity
實務上可透過功能偵測或封裝兼容函式,讓程式碼同時支援兩種瀏覽器。