function onselstaCtl()
{
var the = event.srcElement ;
//通过body的onselectstart属性,控制叶面内容的可选状态。
//标签是 input text 以及 文本域textarea 的,均为可以选择项目。
if( !( ( the.tagName== "INPUT" && the.type.toLowerCase() == "text" ) || the.tagName== "TEXTAREA" ) )
{
return false;
}
return true ;
}
用法:
<body onselectstart="return onselstaCtl();" οncοntextmenu="return false">