event.stopPropagation?event.stopPropagation():event.cancelBubble = true;//防止冒泡
event.preventDefault?event.preventDefault():event.returnValue=false;//防止浏览器默认行为,在IE下,为returnValue
function __selectAll(element)
{
if (document.selection) // ie
{
var rang = document.body.createTextRange();
rang.moveToElementText(element);
rang.select();
}
else if (window.getSelection) // ff
{
var sel = window.getSelection();
var range = document.createRange();
range.selectNodeContents(element);
sel.removeAllRanges();
sel.addRange(range);
}
}
var keyCode = evnet&&event.which?event.which:window.event.keyCode; //event.keyCode按的建的代码,13表示回车