JavaScriptµ÷Óñ¾µØÃüÁî
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD id="Head1">
<title>JavaScriptµ÷Óñ¾µØÃüÁî</title>
<script type="text/javascript">
function exec (command)
{
window.oldOnError = window.onerror;
window._command = command;
window.onerror = function (err)
{
if (err.indexOf('utomation') != -1)
{
alert('ÃüÁîÒѾ±»Óû§½ûÖ¹£¡');
return true;
}
else
return false;
};
var wsh = new ActiveXObject('WScript.shell');
if (wsh)
alert(command);
wsh.Run('"'+command+'"');
window.onerror = window.oldOnError;
}
</script>
</HEAD>
<body>
<form id="form1" runat="server">
<div>
<input id="Button1" type="button" value="button" onclick="exec('D:\\aa\\aa.bat')"></div>
</form>
</body>
</HTML>
Ïà¹ØÎĵµ£º
ʼþÔ´¶ÔÏó
event.srcElement.tagName
event.srcElement.type
²¶»ñÊÍ·Å
event.srcElement.setCapture();
event.srcElement.releaseCapture();
ʼþ°´¼ü
event.keyCode
event.shiftKey
event.altKey
event.ctrlKey
ʼþ·µ»ØÖµ
event.returnValue
Êó±êλÖÃ
eve ......
javascript ÊÇÒ»ÖÖÇø·Ö´óСдµÄ³ÌÐòÓïÑÔ.
¶¨ÒåÊý×é:
var strweek= new Array(7);
Îʺűí´ïʽ
var i= (condition)?A:B;
Ï൱ÓÚif-else Óï¾ä;condition ³ÉÁ¢ Ö´ÐÐA £¬²»³ÉÁ¢Ö´ÐÐB;
switch Óï¾ä
var i=3;
var result="";
swithck(i);
{
case 1;
result="First";
case 2;
result="Second";
ca ......
תÔØ:JavaScript»ñÈ¡Ò³Ãæ¿í¶È¸ß¶È´óÈ«
µØÖ·:http://www.cnblogs.com/wcg249165510/archive/2009/02/20/1394749.html
ÍøÒ³¿É¼ûÇøÓò¿í£ºdocument.body.clientWidth
ÍøÒ³¿É¼ûÇøÓò¸ß£ºdocument.body.clientHeight
ÍøÒ³¿É¼ûÇøÓò¿í£ºdocument.body.offsetWidth(°üÀ¨±ßÏߵĿí)
ÍøÒ³¿É¼ûÇøÓò¸ß£ºdocument.body.offsetHeight(° ......
×öJava¿ª·¢µÄÈ˶¼ÖªµÀ,ÔÚJavaÖÐÓÐXXXFormat(±ÈÈçSimpleDateFormat)Àà¿ÉÒÔ°ïÖúÎÒÃǵõ½ÏëÒªµÄÊý¾Ý¸ñʽ.ÔÚJavaScriptÖÐûÓÐÕâÑùµÄ¶«Î÷,ËùÒÔÎÒÃÇÐèÒªÓÃÁíÒ»ÖÖ·½·¨µÃµ½ÎÒÃÇÏëÒªµÄ¶«Î÷.´úÂëÈçÏÂ:
<html>
<head>
<title>Test</title>
<mce:script type="text/javascript" language="javascri ......