JavaScript serial port (through the vb's MSCOMM32.OCX control)
来源:互联网 发布:笨办法学python kindle 编辑:程序博客网 时间:2024/05/22 06:39
JavaScript serial port (through the vb's MSCOMM32.OCX control)
My Computer is already installed vb environment, the main is that the MSCOMM32.OCX file already exists
<html>
<head>
<title> JavaScript serial port (through the vb's MSCOMM32.OCX controls) </ title>
<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
<! -
/ / Rewrite the the only event-handling code of the the mscomm control are
function MSComm1_OnComm ()
{
var len = 0;
/ / Window.alert ("Happy");
if (MSComm1.CommEvent == 1) / / If it is send events
{
window.alert ("ok") ;/ / phrase normal, send the Description was successful
}
else if (MSComm1.CommEvent == 2) / / If it is receive events
{
/ / Window.alert (MSComm1.CommEvent) ;/ /! '
/ / Window.alert (MSComm1.Input) ;/ /
document.form1.txtReceive.value = document.form1.txtReceive.value + MSComm1.Input;
}
return false;
}
/ / ->
</ SCRIPT>
<SCRIPT LANGUAGE=javascript FOR=MSComm1 EVENT=OnComm>
<! -
/ / MSComm1 controls per encountered OnComm event is on the call the MSComm1_OnComm () function
MSComm1_OnComm ()
/ / ->
</ SCRIPT>
<script language="JavaScript" type="text/javascript">
<! -
/ / Open the port and send the command procedures
function OpenPort ()
{
if (MSComm1.PortOpen == false)
{
MSComm1.PortOpen = true;
MSComm1.Output = "R" ;/ / sending command
}
else
{
window.alert ("have already Start Receive an data if!");
}
}
->
</ Script>
</ Head>
<OBJECT CLASSID = "clsid: 648A5600-2C6E-101B-82B6-000000000014" id = MSComm1 codebase = "MSCOMM32.OCX" type = "application / x-oleobject"
style = "LEFT: 54px; TOP: 14px">
<PARAM NAME="CommPort" VALUE="1">
<PARAM NAME="DTREnable" VALUE="1">
<PARAM NAME="Handshaking" VALUE="0">
<PARAM NAME="InBufferSize" VALUE="1024">
<PARAM NAME="InputLen" VALUE="0">
<PARAM NAME="NullDiscard" VALUE="0">
<PARAM NAME="OutBufferSize" VALUE="512">
<PARAM NAME="ParityReplace" VALUE="?">
<PARAM NAME="RThreshold" VALUE="1">
<PARAM NAME="RTSEnable" VALUE="1">
<PARAM NAME="SThreshold" VALUE="2">
<PARAM NAME="EOFEnable" VALUE="0">
<PARAM NAME="InputMode" VALUE="0">
<PARAM NAME="DataBits" VALUE="8">
<PARAM NAME="StopBits" VALUE="1">
<PARAM NAME="BaudRate" VALUE="9600">
<PARAM NAME="Settings" VALUE="9600,N,8,1">
</ OBJECT>
<body>
<form name="form1">
<input type="submit" name="Submit" value="" onClick="OpenPort()">
<input type="text" name="txtReceive" value="">
</ Form>
</ Body>
</ Html>
- JavaScript serial port (through the vb's MSCOMM32.OCX control)
- JavaScript串口(通过vb的MSCOMM32.OCX控件)
- mscomm32.ocx注册
- Win7 MSCOMM32.ocx 注册
- Mscomm32.ocx注册
- Serial Port
- 注册MSComm32.ocx串口控件
- ROS 进阶学习笔记(12) - Communication with ROS through USART Serial Port
- Loading Files With U-Boot via The Serial Port
- Java serial port design
- SERIAL PORT ABCs
- Configuring a Serial Port
- iPhone serial port communication
- vmware serial port连接
- boost asio serial port
- iPhone serial port communication
- WRT54GS Serial Port
- Serial Port For STM32
- OrangeFS : Advancing PVFS
- 【Windows Store App】 System brushes/fonts/Segoe UI Symbol Icon
- bash入门基础
- Objective c 中的消息传递机制
- .Net 下利用ICSharpCode.SharpZipLib.dll实现文件压缩、解压缩
- JavaScript serial port (through the vb's MSCOMM32.OCX control)
- hdu_1276 士兵队列训练问题
- Java 删除一个文件夹下面的所有文件
- Linux嵌入式移植之——(3)支持DM9000网卡
- 带子屏幕的SCREEN逻辑流处理原则
- [解决方法]shc -f xxx.sh shc: invalid first line in script
- JAVA操作串口有感
- 基于 mini2440 电阻式触摸屏:电阻式触摸屏工作原理
- redis主备手动failover测试