Weird Attribute in HTML

193 views Asked by At

When I tried to inspect one of the textbox in IE8, I found that there is weird attribute in the tag. This does not happened in only checkbox and textbox, all input type include select as well.

Where is this attribute came from? If it is valid, what does it mean?

jQuery17204372428416893459="14"

<INPUT onblur="" id="id1" class="class1" onkeyup="" onclick="" onchange="" maxLength="30" size="200" name="name1" autocomplete="off" jQuery17204372428416893459="14" value="" />
1

There are 1 answers

4
jojo On

Confirm that you are seeing the same issue with this fiddle: https://jsfiddle.net/B4TyL/1/

This "expando" attribute is used by jQuery to keep track of the events bound to your checkbox element. If you can't check it, that's probably because you have an event handler function preventing it.

Try this:

You'll need to modify your jquery source. For example, 1.6.2: http://code.jquery.com/jquery-1.6.2.js

Includes the following:

jQuery.extend({
    cache: {},

    // Please use with caution
    uuid: 0,

    // Unique for each copy of jQuery on the page
    // Non-digits removed to match rinlinejQuery
    expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ),

You can change the expando line as follows:

    // Does not support multiple copies of jQuery on the same page!
    // 0 included to match rinlinejQuery (/jQuery\d+/)
    expando: "jQuery0",