Ir para conteúdo
Fórum Script Brasil
  • 0

Bloqueio De Botão


rodrigo_pnunes

Pergunta

oi amigos , coloquei minha dúvida já a algum tempo , e como não obtive resposta imaginei que fosse porque demorei muito para retronan com a dúvida , por isso estou colocando um novo tópico com a mesma dúvida . ai vai :

AMIGOS TENTEI INSERIR OS CÓDIGOS ABAIXO :

CÓDIGO QUE INATIVA BOTÃO DIREITO DO MOUSE

// JavaScript Document

if (window.Event)

document.captureEvents(Event.MOUSEUP);

function nocontextmenu()

{

event.cancelBubble = true

event.returnValue = false;

return false;

}

function norightclick(e)

{

if (window.Event)

{

if (e.which == 2 || e.which == 3)

return false;

}

else

if (event.button == 2 || event.button == 3)

{

event.cancelBubble = true

event.returnValue = false;

return false;

}

}

if (document.layers) {

document.captureEvents(Event.MOUSEDOWN);

}

document.oncontextmenu = nocontextmenu;

document.onmousedown = norightclick;

document.onmouseup = norightclick;

//-->

CÓDIGO QUE NÃO PERMITE A SELEÇÃO

// JavaScript Document

<!--

function disableselect(e){

return false

}

function reEnable(){

return true

}

document.onselectstart=new Function ("return false")

if (window.sidebar){

document.onmousedown=disableselect

document.onclick=reEnable

}

//-->

EU OS COPIEI ASSIM E COLEI NO CÓDIGO DA MINHA PÁGINA , POR FAVOR VERIFIQUEM SE ESTÁ CERTO , POIS O MEU OBJETIVO É IMPEDIR QUE TEXTOS SEJAM COPIADOS DAS PÁGINAS . OBS : AS PÁGINAS ESTÃO LOCALIZADAS NO DIREITORIO PRINCIPAL . AI VAI O CÓDIGO :

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

<title>Sabre Themeset</title>

<!-- Information generated and read by Xara Webstyle. Do not edit this line. [sabre (Theme);gcmcg;Theme Color 1;11840671;themecolour1;Theme Color 2;16746512;themecolour2;Background Color;16777215;themecolour3;Button Text;0;themecolour4;Button Text (over);0;themecolour5;Heading Text;4522498;themecolour6;Sub-Heading & Logo Text ;16777215;themecolour7] -->

<!-- Template design © Xara Ltd 2003 -->

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<meta name="generator" content="Xara Webstyle 4. See xara.com/webstyle"

// JavaScript Document

if (window.Event)

document.captureEvents(Event.MOUSEUP);

function nocontextmenu()

{

event.cancelBubble = true

event.returnValue = false;

return false;

}

function norightclick(e)

{

if (window.Event)

{

if (e.which == 2 || e.which == 3)

return false;

}

else

if (event.button == 2 || event.button == 3)

{

event.cancelBubble = true

event.returnValue = false;

return false;

}

}

if (document.layers) {

document.captureEvents(Event.MOUSEDOWN);

}

document.oncontextmenu = nocontextmenu;

document.onmousedown = norightclick;

document.onmouseup = norightclick;

//-->

// JavaScript Document

<!--

function disableselect(e){

return false

}

function reEnable(){

return true

}

document.onselectstart=new Function ("return false")

if (window.sidebar){

document.onmousedown=disableselect

document.onclick=reEnable

}

//-->

<style type="text/css">

<!--

.style3 {color: #C8D2D7}

-->

</style>

</head>

<style type="text/css">

<!--

body {

background-color: #FFFFFF;

color: #333333;

margin-left: 0px;

margin-top: 0px;

margin-right: 0px;

margin-bottom: 0px;

AI SEGUE O CÓDIGO ...OBRIGADO PELA ATENÇÃO ! ! ! !

OUTRA COISA QUE ESTÁ ACONTECENDO , É QUE NO TOPO DA PÁGINA ESTA APARECENDO " // JavaScript Document " , O QUE É ISSO ? FIZ ALGO ERRADO NO CÓDIGO ?

Link para o comentário
Compartilhar em outros sites

3 respostass a esta questão

Posts Recomendados

  • 0

Especifique melhor o seu problema. você está com problemas no código Java Script? É melhor você postar esses códigos no fórum de JS.

O problema do "Java Script Document" pode ser porque você colocou os códigos fora das tags <script> e </script>. Tente inserir essas tags e ver se o problema é resolvido.

Abraço

Link para o comentário
Compartilhar em outros sites

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152,2k
    • Posts
      652,1k
×
×
  • Criar Novo...