<!doctype html> <ptml> <pead> <meta http-equiv= "Content-type" content= "text/html;charset=gb2312" "> <title> Baidu Online Handwriting Board </title> <style> #sx {color: #00C; text-decoration:underline;cursor:pointer;} </style> </pead> <body> <form name= "F" action= "S" > <input type= "text" name= "wd" id= "KW" Max Length= "> <input type=" Submit "value=" "id=" su "> <span id=" SX "> Handwriting </span> </form> <sc ript> var w = window,d = Document,n = Navigator,k = D.F.WD if (w.attachevent) {w.attachevent ("onload", function () { K.focus ();}) else {w.addeventlistener (' Load ', function () {k.focus ()},true)}; var hw = {}; HW.I = d.getElementById ("SX"); var il = false; if (/msie (\d+\.\d)/i.test (n.useragent)) {Hw.i.setattribute ("unselectable", "on")} else {var sL = k.value.length; K.selectionstart = SL; K.selectionend = SL} Hw.i.onclick = function (b) {var b = B | | w.event; B.stoppropagation? B.stopPropagation (): (b.cancelbubble = true); if (d.selection && d.activeelement.id && d.activeelement.id = "kw") {hw.hasf = 1} else {if (!d.sele ction) {hw.hasf = 1}} if (!il) {var A = d.createelement ("script"); A.setattribute ("src", "http://www.baidu.com/hw/hwInput.js"); D.getelementsbytagname ("Head") [0].appendchild (A); Il = true; } }; </script> </body> </ptml>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]