Jump to content
Fórum Script Brasil
  • 0

Código Para Desabilitar Mouse No Opera

hipnos na area


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.oncontextmenu = new Function("return false;")

Teste no Opera e veja se funciona.


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)){   
            //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.

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.


  • Forum Statistics

    • Total Topics
    • Total Posts
  • Create New...