copy - paste in javascript

Posted by Dumbledore of flash on Stack Overflow See other posts from Stack Overflow or by Dumbledore of flash
Published on 2010-06-16T18:43:57Z Indexed on 2010/06/16 18:52 UTC
Read the original article Hit count: 192

Filed under:

I have this code

<input name="mpan[]" value="" maxlength="2" size="2">
<input name="mpan[]" value="" maxlength="2" size="3"> 
<input name="mpan[]" value="" maxlength="2" size="3">
<input name="mpan[]" value="" maxlength="2" size="12">

What I have to do is I am provided with a large key for example 0380112129021. When I do Ctrl+C on that key and select any box and press Ctrl+V, the number automatically get pasted in different box, for example: first input box gets 03, next gets 801, next gets 112 and rest gets pasted on last one 129021.how do i achive this from javascript

© Stack Overflow or respective owner

Related posts about JavaScript