I have an element:
input name="crd[69][qty]" id="crd[69][qty]" value="1" size="4" class="input-text qty" maxlength="12"
Ii had mentioned the name in array format to be use in background PHP, what I need to achieve is:
- When user clicks on this textbox , I should be able to retrieve only “69” from the id of the element which is
"crd[69][qty]". This id will be varying for different textboxes…
Is there any jQuery function to accomplish this?
I’m not a regex expert but this should work:
http://jsfiddle.net/7jUHz/1/