|
|
|
| Как обработать onMouseDown, так чтобы слой нельзя было пертаскивать за дочерние элементы? | |
|
|
|
|
|
|
|
для: mistix
(24.09.2007 в 20:14)
| | да накрой его сверху прозрачным слоем с огромным зет-индексом | |
|
|
|
|
|
|
|
для: mistix
(24.09.2007 в 20:14)
| |
<html>
<script>
function f(e)
{
alert('можно тащить');
}
</script>
<div style="width:200px;height:100px;background-color:red" onMouseDown="f(event)">
<form onMouseDown="event.stopPropagation?event.stopPropagation():event.cancelBubble=true">
<input>
</form>
</div>
</html>
|
<html>
<script>
function f(e)
{
if((e.target || e.srcElement).tagName == 'DIV')alert('можно тащить');
else alert('не можно');
}
</script>
<div style="width:200px;height:100px;background-color:red" onMouseDown="f(event)">
<form>
<input>
</form>
</div>
</html>
|
| |
|
|
|
|
|
|
|
для: RMW
(24.09.2007 в 22:01)
| | БОЛЬШОЕ СПАСИБО! | |
|
|
|