 
		人生就如一首歌
2015-10-16 18:22
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title> 内容选中事件 </title>
<script type="text/javascript">
  function message()
  {
    alert("您触发了选中事件!");
    var jop=confirm("对不起你不能复制!"){
        if (jop==true){
            alert("sdfsdf")
        }
    }
    }     
</script>    
</head>
<body>
  <form>
  个人简介:<br>
   <textarea name="summary" cols="60" rows="5" onselect="message()">请写入个人简介,不少于200字!</textarea>
  </form>
</body>
</html> 
				confirm后面不能跟{}
改成这样就可以了
function message()
  {
    alert("您触发了选中事件!");
    var jop=confirm("对不起你不能复制!")
    if (jop==true){
        alert("sdfsdf")
    }
    
  }JavaScript进阶篇
469067 学习 · 22582 问题
相似问题