JavaScript 屏蔽右键
1、function vv()
{
if(event.button==2)
{
alert('防止服务器负担过大,右键功能被屏蔽!')
}
}
document.onmousedown=vv
2、document.oncontextmenu = new Function("return false;")
3、<body oncontextmenu="return false" >
相关文档:
引言
增加客户端的表单验证可以为用户提供更快的体验,但决不能忽视的是,客户端表单验证永远不应该取代服务器端的验证,而只能是辅助和增强。根据经验JavaScript验证表单基本分为以下几方面的内容,必填字段、特殊模式匹配等,还要注意错误的提示方式对一个表单的可用性有着极其重要的影响。
2建立表单
&nb ......
<html>
<body>
<script type="text/JScript">
for (i=0; i<10000; i++) { // this loop enforces the effect
var model = new Object();
var element = document.createElement("<br>");
model.myElement = ......
自定义控件中的页面代码:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="wcontrol.ascx.cs" Inherits="wcontrol" %>
<script type ="text/javascript">
function PopupCalendar(InstanceName)
{
///Global Tag
this.instanceName=InstanceName;
///Properties
this.separator="-"
t ......
1. oncontextmenu="window.event.returnValue=false" 将彻底屏蔽鼠标右键
<table border oncontextmenu=return(false)><td>no</table> 可用于Table
2. <body onselectstart="return false"> 取消选取、防止复制
3. onpaste="return false" 不准粘贴
4. oncopy="return false;" oncut="return f ......
以下以 IE 代替 Internet Explorer,以 MF 代替 Mozzila Firefox
1. document.form.item 问题
(1)现有问题:
现有代码中存在许多 document.formName.item("itemName") 这样的语句,不能在 MF 下运行
(2)解决方法:
&nb ......