专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > vbScript

vbs 转 js,该怎么解决

发布时间:2010-05-20 14:01:29 文章来源:www.iduyao.cn 采编人员:星星草
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>
友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。

其他相似内容:

热门推荐: