165.xhtml (847B)
1 <?xml version="1.0" encoding="utf-8"?> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <title>Moving text between tel inputs</title> 5 <script type="application/ecmascript"> 6 function check() 7 {var input = document.querySelectorAll('input'); 8 document.querySelector('p').firstChild.nodeValue = (input[0].value == '' && input[1].value == '123456789')?'PASS':'FAIL';} 9 </script> 10 </head> 11 <body onload="document.querySelector('input').select()"> 12 <p>Drag selected number to the blue box. Copy of selection should end up in the blue box once you drop it there.</p> 13 <p><input type="tel" value="123456789"/></p> 14 <p><input ondragenter="event.preventDefault()" ondragover="event.preventDefault();event.dataTransfer.effectAllowed = 'move'" ondrop="window.setTimeout('check()',100)" type="tel" placeholder="Drop selection here"/></p> 15 </body> 16 </html>