欢迎来到Doc100.Net免费学习资源知识分享平台!
您的位置:首页 > 程序异常 >

vbs 转 js,该怎么解决

更新时间: 2014-01-05 01:52:37 责任编辑: Author_N1

 

vbs 转 js
<OBJECT id="PIS20041" style="LEFT: 0px; TOP: 0px" height=197 width=212
classid="clsid:EAE8E84F-F40D-49EA-A9AF-07E7FEA64B0B" name=PIS20041>
  <PARAM NAME="_Version" VALUE="65536">
  <PARAM NAME="_ExtentX" VALUE="5609">
  <PARAM NAME="_ExtentY" VALUE="5212">
  <PARAM NAME="_StockProps" VALUE="0">
  <PARAM NAME="EnrollPlayMode" VALUE="0">
  <PARAM NAME="VerifyPlayMode" VALUE="0">
  <PARAM NAME="VerifyThreshold" VALUE="0">
</OBJECT>
<script language="VBScript">
Sub PIS20041_PressFinger(ByVal ImageType, ByVal PressCount)
Dim vstr
Dim vstrTemp

  If ImageType = 1 Then
  '' message to requires that has finger put on.
  If PressCount < 0 Then
  txtMsg.Value = "Put your finger !"
  ElseIf PressCount = 0 Then
  txtMsg.Value = "Retry, put your finger !"
  Else
  txtMsg.Value = "Put your finger " & "(" & PressCount & ") !"
  End If
   
  ElseIf ImageType = 2 Then
  '' message to select the Paper fp image file.
  If PressCount < 0 Then
  txtMsg.Value = "Select Paper-Fp file !"
  ElseIf PressCount = 0 Then
  txtMsg.Value = "Retry, select Paper-Fp file !"
  Else
  txtMsg.Value = "Select Paper-Fp file " & "(" & PressCount & ") !"
  End If
  LoadFpBMPFile
 
  If vstrBMPFileName <> "" Then
  PIS20041.PaperFileName = vstrBMPFileName
  Else
  cmdCancel_OnClick
  End If
   
   
  ElseIf ImageType = 3 Then
  '' message to select the Paper fp image file.
  If PressCount < 0 Then
  txtMsg.Value = "Select Remote-Fp file !"
  ElseIf PressCount = 0 Then
  txtMsg.Value = "Retry, select Remote-Fp file !"
  Else
  txtMsg.Value = "Select Remote-Fp file " & "(" & PressCount & ") !"
  End If
  LoadFpBMPFile()
  If vstrBMPFileName <> "" Then
  PIS20041.RLiveFileName = vstrBMPFileName
  Else
  cmdCancel_OnClick
  End If
   
  End If
   
End Sub
</script>

请问这是什么意思啊? 怎么转成 js ?

--参考方法--
最上面是一个控件,一个没有见过的控件。下面是事件处理程序,大概是处理触摸屏的手指点击事件。

事件处理中,根据手指所按的图片类别,分别作出不同回应。点击1类图片仅只是进行信息提示,点击2类图片用于从本地加载其它图片,似乎是什么滤纸图片,而点击3类图片则用于加载远程图片。
--参考方法--
试下:
HTML code

<script for="PIS20041" event="PressFinger(imageType, pressCount)">
    alert(imageType);
    alert(pressCount);
</script>

--参考方法--
从没有见过这玩意儿。怪不得classid那么怪异,根本查不到。长见识。希望有机会多见识见识。
--参考方法--
直译,参考^_^
HTML code

<script language="javascript">
function  PIS20041_PressFinger(ImageType,PressCount){
    var vstr 
    var vstrTemp 
    
    if (ImageType == 1){
    //message to requires that has finger put on. 
        if(PressCount < 0)txtMsg.Value = "Put your finger !" 
        else if (PressCount == 0)txtMsg.Value = "Retry, put your finger !" 
        else txtMsg.Value = "Put your finger (" + PressCount + ") !" 
    }
    
    else if (ImageType == 2){ 
    //message to select the Paper fp image file. 
        if (PressCount < 0)txtMsg.Value = "Select Paper-Fp file !" 
        else if (PressCount == 0)txtMsg.Value = "Retry, select Paper-Fp file !" 
        else txtMsg.Value = "Select Paper-Fp file (" + PressCount + ") !" 
        LoadFpBMPFile()
        if (vstrBMPFileName != "")PIS20041.PaperFileName = vstrBMPFileName 
        else cmdCancel_OnClick() 
    }
    
    else if (ImageType == 3){ 
    //message to select the Paper fp image file.
        if (PressCount < 0)txtMsg.Value = "Select Remote-Fp file !" 
        else if (PressCount == 0) txtMsg.Value = "Retry, select Remote-Fp file !" 
        else txtMsg.Value = "Select Remote-Fp file (" + PressCount + ") !" 
        LoadFpBMPFile() 
        if (vstrBMPFileName != "")PIS20041.RLiveFileName = vstrBMPFileName 
        else cmdCancel_OnClick ()
    }
}
</script> 			
			
		
上一篇:上一篇
下一篇:下一篇

 

随机推荐程序问答结果

 

 

如对文章有任何疑问请提交到问题反馈,或者您对内容不满意,请您反馈给我们DOC100.NET论坛发贴求解。
DOC100.NET资源网,机器学习分类整理更新日期::2014-01-05 01:52:37
如需转载,请注明文章出处和来源网址:http://www.doc100.net/bugs/t/2398/
本文WWW.DOC100.NET DOC100.NET版权所有。