javascriptµ÷ÓÃocx
<OBJECT id="ocxÎļþÃû" codeBase="ocx¿Ø¼þµÄÏà¶ÔλÖÃ#version=1,0,0,0"
data="data:application/xoleobject;base64,mRHW/Ifh3UqI5ZryOEhtERAHAAD/KgAAYSQAAA=="
classid="CLSID:ͨ¹ýMCPÕÒµ½µÄclassid" VIEWASTEXT>
</OBJECT>
Javascriptµ÷ÓÃOCX¿Ø¼þ
ʲôÊÇocx¿Ø¼þ£¿
¶ÔÏóÁ´½ÓºÍǶÈëÓû§¿Ø¼þ£¨OCX£©ÊÇÒ»ÖÖ¿ÉÒÔÓÉÔÚ΢ÈíµÄWindowsϵͳÖÐÔËÐеÄÓ¦ÓÃÈí¼þ´´½¨Ê¹ÓõÄÌØÊâÓÃ;µÄ³ÌÐò¡£
żÓõÄVC6£¬Ë³ÊÖ¿ª·¢ÁËÒ»¸ö¼òµ¥µÄocx¿Ø¼þ£¬¾ßÌåÔõôдµÄ¾Í²»ÏÔÁË¡£
×öºÃÁËÒԺ󣬲ÅÊÇÎÒ½ñÌìÒª¼ÇϵĶ«Î÷——ͨ¹ýJavascriptµ÷ÓÃocx¿Ø¼þ¡£
ÕâÀïµÄµ÷Óûù±¾ÉÏ¿ÉÒÔ·ÖÕ⼸²½£º
1.ÕÒ³öÏà¹ØÐÅÏ¢
Ê×ÏÈÎÒÃǵĸøÕâ¸öocxÆð¸öÃû×Ö£¬ÆðʲôÃû×Öͨ¹ý×îºóÉú³ÉµÄocx¿Ø¼þµÄÎļþÃû¾ö¶¨¡£
µÚ¶þ£¬ÎÒÃǵÄÕÒµ½Õâ¸öocxµÄ±àºÅÖµ,½«ocxÌáÈ¡³öÀ´£¬ÎÒ²ÉÓÃMicrosoft Control PadÀ´±à¼£¬µÃµ½ocx¿Ø¼þµÄclassid, È»ºóÎÒÃÇ×öÏÂÃæµÄ¹¤×÷¡£
2.×¢²áocx¿Ø¼þ
×¢²áocx¿Ø¼þʹÓÃRegSvr32.exe¡£
ʹÓÃRegSvr32.exe(ÔÚSystemĿ¼ÏÂ)×¢²á£¬Ó﷨Ϊ£º
RegSvr32 ocxname.ocx
Èç¹û×¢²á³É¹¦½«ÏÔʾһ¸ö³É¹¦µÄÏûÏ¢¿ò¡£
Èç¹û²»Ï£Íû¿´µ½Õâ¸ö¶Ô»°¿ò£¬Ò²¿ÉÒÔʹÓÃ/sÑ¡ÏÈç
RegSvr32 /s your.ocx
Èç¹ûÈ¡Ïû×¢²á£¬¿ÉÒÔʹÓÃ/uÑ¡ÏÈç
RegSvr32 /u your.ocx
3.¼ÓÔØocx¿Ø¼þ
×¢²á³É¹¦ºó£¬ÎÒÃǾ͵Ãдһ¸öhtmlÒ³Ã棬ͨ¹ý<OBJECT>À´¼ÓÔØÕâ¸ö¿Ø¼þÁË¡£¾ßÌåÈçÏ£º
4.µ÷ÓÃ
ÏÈÒª¶¨Òåµ÷ÓÃʼþ
<a href="javascript:IOStart()" mce_href="javascript:IOStart()" >short IOStart()</a>
½ÓÏÂÀ´Ð´µ÷Ó÷½·¨
function IOStart()
{
TestOcx.IOStart();
}
˵Ã÷£ºTestOcx¶ÔÓ¦ÓÚ<OBject>ÖеÄidÊôÐÔ¡£IOStart()ÊÇÔÚocxÖж¨ÒåµÄ·½·¨¡£
Ïà¹ØÎĵµ£º
¾«Í¨ JSÕýÔò±í´ïʽ
ÕýÔò±í´ïʽ¿ÉÒÔ:
•²âÊÔ×Ö·û´®µÄij¸öģʽ¡£ÀýÈ磬¿ÉÒÔ¶ÔÒ»¸öÊäÈë×Ö·û´®½øÐвâÊÔ£¬¿´ÔÚ¸Ã×Ö·û´®ÊÇ·ñ´æÔÚÒ»¸öµç»°ºÅÂëģʽ»òÒ»¸öÐÅÓÿ¨ºÅÂëģʽ¡£Õâ³ÆΪÊý¾ÝÓÐЧÐÔÑéÖ¤
•Ìæ»»Îı¾¡£¿ÉÒÔÔÚÎĵµÖÐʹÓÃÒ»¸öÕýÔò±í´ïʽÀ´±êʶÌض¨ÎÄ×Ö£¬È»ºó¿ÉÒÔÈ«²¿½«Æäɾ³ý£¬»òÕßÌ滻Ϊ±ðµÄÎÄ×Ö
•¸ù¾ÝÄ£Ê ......
Ò»£¬javascriptµÄÄÚ²¿¶ÔÏó£¨Ï൱ÓÚϵͳµ÷Óã¬Æäʵ±¾ÖÊÊÇÒ»¸ö¹¹Ô캯Êý£©
1£¬¶¯Ì¬¶ÔÏó
ʹÓÓ¶ÔÏóʵÀýÃû.³ÉÔ±”µÄ¸ñʽÀ´·ÃÎÊÆäÊôÐԺͷ½·¨¡££¨ÓÃnewÏÈ´´½¨¶ÔÏóʵÀý£©
2£¬¾²Ì¬¶ÔÏó
Ö±½ÓʹÓÓ¶ÔÏóÃû.³ÉÔ±”µÄ¸ñʽÀ´·ÃÎÊÆäÊôÐԺͷ½·¨
¶þ£¬¼¸¸öÄÚÖö ......
<HTML>
<HEAD>
<META http-equiv='Content-Type' content='text/html; charset=gb2312'>
<TITLE>Óð´Å¥ÏÔʾԴ´úÂë»òÕßjavascriptÀïÃæµÄÄÚÈÝ£¬ÓÐʱ»áÓÐ</TITLE>
</HEAD>
<BODY >
<script id=abc >
function dennisboys()
{
var i=0;
alert(document.documentElem ......
1. document.write( " "); Êä³öÓï¾ä
2.JSÖеÄ×¢ÊÍΪ//
3.´«Í³µÄHTMLÎĵµË³ÐòÊÇ:document- >html- >(head,body)
4.Ò»¸öä¯ÀÀÆ÷´°¿ÚÖеÄDOM˳ÐòÊÇ:window- >(navigator,screen,history,location,document)
5.µÃµ½±íµ¥ÖÐÔªËصÄÃû³ÆºÍÖµ:document.getElementById( "±íµ¥ÖÐÔªËصÄID號 &quo ......
´´½¨¶¯Ì¬º¯Êý£¨ÔÚc/c++ÖÐÀûÓú¯ÊýÖ¸ÕëÀ´ÊµÏÖ£©
var FunctionName = new Function(argument1,...,lastargument);
˵Ã÷£º
ËùÓеIJÎÊý¶¼±ØÐëÊÇ×Ö·û´®ÀàÐ͵ģ¬×îºóµÄÒ»¸ö²ÎÊý±ØÐëÊÇÕâ¸ö¶¯Ì¬º¯ÊýµÄ¹¦ÄܳÌÐò´úÂë¡£
<script type="text/javascript">
& ......