Jump to content
Fórum Script Brasil
  • 0

Código Para Desabilitar Mouse No Opera


hipnos na area
 Share

Question

4 answers to this question

Recommended Posts

  • 0

Estou sem o Opera aqui para testar, mas este funciona perfeitamente no Ie 6 e no FF 2:

<script type="text/javascript" language="javascript">
function click() {
if (event.button==2||event.button==3) {
 oncontextmenu='return false';
  }
}
document.onmousedown=click
document.oncontextmenu = new Function("return false;")
</script>

Teste no Opera e veja se funciona.

[]'s

Link to comment
Share on other sites

  • 0

function EventValida( event )
{
    if( !event ) event = window.event;
    var iKeyCode = String(event.keyCode ? event.keyCode : event.which);
    var oSrcElement = event.srcElement ? event.srcElement : event.currentTarget;        
    
    if (iKeyCode == 9)
    {
        if (!IsValidObj(oSrcElement)){   
            oSrcElement.focus();
            oSrcElement.AddClassName("exception");                   
            //w3c stop default behavior
            if( event.cancelable ) event.preventDefault();
            //ie stop default behavior
            event.returnValue = false;
            //DOM level 0 stop default behavior
            return false;                        
        }    
    }
}

Olimpia achei esse código lá no link que você passou

porem não sei como devo aplicar o valor de event

tipo na função EventValida( event );

não sei onde aplica-la

tipo se eu usar onkeydown="EventValida( event );" ou onkeypress="EventValida( event );"

que valor eu devo jogar em event???

grato pela ajuda B)

Edited by hipnos na area
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



  • Forum Statistics

    • Total Topics
      151k
    • Total Posts
      649.1k
×
×
  • Create New...