getWeather({"success":"1","result":[{"cityno":"shanghai"}) 爱秀代码 - Powered by Discuz! Board
免費論壇 繁體 | 簡體
Sclub交友聊天~加入聊天室當版主
分享
Board logo

标题: [求助] 站长能否出个限制右键代码? [打印本页]

作者: 零九三零    时间: 2018-11-5 22:33     标题: 站长能否出个限制右键代码?

站长能否出个限制右键代码?只有指定人才可以右键比如管理员,版主指定后可以用右键其他人无法使用的代码?
作者: icode    时间: 2018-11-5 22:39

回复 1# 零九三零


    应该可以,我试试啊
作者: 零九三零    时间: 2018-11-5 22:41

多谢官大的支持和无私奉献
作者: icode    时间: 2018-11-5 22:47

编辑header模板,找到
  1. <body id="{CURSCRIPT}" onkeydown="if(event.keyCode==27) return false;">
复制
在下边加
  1. <!--{if $adminid != 1}-->
  2. <SCRIPT>
  3. function disableselect(e) {
  4.         return false
  5. }

  6. function reEnable() {
  7.         return true
  8. }
  9. file: //if IE4+
  10. document.onselectstart = new Function("return false")
  11. file: //if NS6
  12. if (window.sidebar) {
  13.         document.onmousedown = disableselect
  14.         document.onclick = reEnable
  15. }

  16. function MM_reloadPage(init) { //reloads the window if Nav4 resized
  17.         if (init == true) with(navigator) {
  18.                 if ((appName == "Netscape") && (parseInt(appVersion) == 4)) {
  19.                         document.MM_pgW = innerWidth;
  20.                         document.MM_pgH = innerHeight;
  21.                         onresize = MM_reloadPage;
  22.                 }
  23.         } else if (innerWidth != document.MM_pgW || innerHeight != document.MM_pgH) location.reload();
  24. }
  25. MM_reloadPage(true);
  26. </SCRIPT>
  27. <!--{/if}-->
复制

作者: 零九三零    时间: 2018-11-5 23:18

这么快?官大你也太牛啦啊哈哈谢谢谢谢
作者: 零九三零    时间: 2018-11-5 23:24

指定人怎么设置啊?
官大?
作者: 零九三零    时间: 2018-11-5 23:56

回复 6# 零九三零


    经测试有效果谢谢
作者: icode    时间: 2018-11-6 08:25

看帖回帖那是一定要的:淡定中,谢谢分享

作者: 麻城生活网    时间: 2018-11-6 15:15

回复 8# icode


    两个字    流弊
作者: 波斯佳人    时间: 2018-11-6 16:42

看帖回帖那是一定要的:哇!你真有才!





欢迎光临 爱秀代码 (http://icode.258club.com/) Powered by Discuz! 7.2