Reputation: 3
I have this code in my page
<script language="JavaScript" defer>totCb["19782"] = 2;</script>
I call this almost in the end of the script, this should add the new value to the array totCb
. This works in IE but not in Chrome or FF, why?
Upvotes: 0
Views: 148
Reputation: 270677
The language attribute is deprecated in favor of the type attribute. Instead try specifying it as such:
<script type="text/javascript" defer="defer">
totCb["19782"] = 2;
</script>
According to w3 schools, defer
is only supported by IE.
Upvotes: 0
Reputation: 179176
I have no idea what doctype you're using, but in HTML5:
The defer and async attributes must not be specified if the src attribute is not present.
Upvotes: 3
Reputation: 9
IE is the only browser that supports the defer "attribute" in the script tag.
Upvotes: -1