javascript optino onclick ie ½â¾ö·½°¸
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>select-option onclick </title>
<script type="text/javascript" >
function simOptionClick4IE(){
var evt=window.event ;
var selectObj=evt?evt.srcElement:null;
// IE Only
if (evt && selectObj && evt.offsetY && evt.button!=2
&& (evt.offsetY > selectObj.offsetHeight || evt.offsetY<0 ) ) {
// ¼Ç¼ÔÏȵÄÑ¡ÖÐÏî
var oldIdx = selectObj.selectedIndex;
setTimeout(function(){
var option=selectObj.options[selectObj.selectedIndex];
// ´Ëʱ¿ÉÒÔͨ¹ýÅÐ¶Ï oldIdx ÊÇ·ñµÈÓÚ selectObj.selectedIndex
// À´ÅжÏÓû§ÊDz»Êǵã»÷ÁËͬһ¸öÑ¡Ïî,½ø¶ø×ö²»Í¬µÄ´¦Àí.
showOptionValue(option)
}, 60);
}
}
function showOptionValue(opt,msg){
alert('a
Ïà¹ØÎĵµ£º
JavaScriptÖеļôÌù°å(clipboardData)
clipboardData ¶ÔÏó
ÌṩÁ˶ԼôÌù°åµÄ·ÃÎÊ¡£
Èý¸ö·½·¨
1.clearData(sDataFormat) ɾ³ý¼ôÌù°åÖÐÖ¸¶¨¸ñʽµÄÊý¾Ý¡£
2.getData(sDataFormat) ´Ó¼ôÌù°å»ñÈ¡Ö¸¶¨¸ñʽµÄÊý¾Ý¡£
3.setData(sDataFormat, sData) ¸ø¼ôÌù°å¸³ÓèÖ¸¶¨¸ñʽµÄÊý¾Ý¡£·µ»Ø true ±íʾ²Ù×÷³É¹¦¡£
Àý×Ó
<script ......
Ç°¼¸ÌìÔÚ²âÊÔÍøÕ¾¼æÈÝÐÔÎÊÌ⣬·¢ÏÖÔÀ´ÔÚIEÏÂÃæÕý³£µÄÏÔʾʱ¼äÔÚFirefox»ñÈ¡Äê·ÝÏÂÏÔʾ109
&nb ......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<head>
<title>ÎÞÏÞ¼¶Ê÷Ð ......
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="re ......
×¢Ò⣺readOnlyÖеÄOÒª´óд
//Ò³Ãæ³õʼ»¯Â¼È룬ÅжÏÖ¸±ê˵Ã÷ÊÇ·ñΪ¹¤×ÊÐÔÖ§³ö¡£
function init() {
var mark = "<%=mark%>";
//Èç¹ûÖ¸±ê˵Ã÷Ϊ“¹¤×ÊÐÔÖ§³ö”£¬Ôò¹¤×ÊÖ§³öÄÇÒ»Ïî±äΪֻ¶Á£¬ÇÒֵΪ“Ö¸±ê¿ÉÓýð¶î”£»ÆäËû¼Èë¿ò¶¼²»¿É¼Èë¡£
......