C
cron
Is there any way to prevent bubbling to the child div in the setup below? Ibasically need to occasionally disallow return breaks and other charactersbut have the body function as a normal text editor otherwise. (in other words, adding contentEditable=true to child divs will not do)
Thanks in advance!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript">
function checkKey(event){
if (event.keyCode === 13){
return(false)
}
return(true)
}
</script>
</head>
<body contentEditable="true" onkeydown="return(checkKey)">
<div>test 1</div>
<div>test 2</div>
<div>test 3</div>
</body>
</html>
Thanks in advance!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript">
function checkKey(event){
if (event.keyCode === 13){
return(false)
}
return(true)
}
</script>
</head>
<body contentEditable="true" onkeydown="return(checkKey)">
<div>test 1</div>
<div>test 2</div>
<div>test 3</div>
</body>
</html>