我可以防止在“onblur”事件中丢失选择吗?
<!DOCTYPE html>
<html xmlns = "http://www.w3.org/1999/xhtml" xml:lang = "en" lang = "en">
<head>
<meta http-equiv = "Content-Type" content = "text/html; charset=utf-8">
<script type = "text/javascript">
window.onload = function () {
var textarea = document.getElementsByTagName ("textarea")[0];
textarea.onblur = function () {
alert ("Should keep selection");
return false;
}
}
</script>
<title>Select me !</title>
</head>
<body>
<textarea>Select me !</textarea>
</body>
</html>
谢谢/