Copy codeThe Code is as follows :/**
* Set the page to read-only
*/
Var setReadOnly = function ()
{
Var input = $ ("input ");
Input. each (function (I)
{
$ (This). attr ("onfocus", "this. blur (); return false ;");
$ (This). wrap (function ()
{
Return '<span onmousemove = "this. setCapture ();" onmouseout = "this. releaseCapture ();"/> ';
});
});
Var select = $ ("select ");
Select. each (function (I)
{
$ (This). attr ("onfocus", "this. blur (); return false ;");
$ (This). wrap (function ()
{
Return '<span onmousemove = "this. setCapture ();" onmouseout = "this. releaseCapture ();"/> ';
});
});
Var textarea = $ ("textarea ");
Textarea. each (function (I)
{
$ (This). attr ("onfocus", "this. blur (); return false ;");
$ (This). wrap (function ()
{
Return '<span onmousemove = "this. setCapture ();" onmouseout = "this. releaseCapture ();"/> ';
});
});
Var img = $ ("img ");
Img. each (function (I)
{
$ (This). attr ("onfocus", "this. blur (); return false ;");
$ (This). wrap (function ()
{
Return '<span onmousemove = "this. setCapture ();" onmouseout = "this. releaseCapture ();"/> ';
});
});
}