[英]How to call a Javascript function in MFC?
我正在創建一個發送郵件的程序。 我想使用 Javascript 來驗證 email id。 誰能說如何從 MFC 調用 Javascript function?
Package 將 Javascript 轉換成Windows Script Component ,然后通過 ZD47C174ED27779706CFC7276C 調用它
<?xml version="1.0"?>
<package>
<component id="Lovesall.Com.EmailValidator">
<comment>
Descriptive comment goes here.
</comment>
<?component error="true" debug="true"?>
<registration
description="WSC Component for Email Validation"
progid="Lovesall.Com.EmailValidator"
version="1.00"
classid="{a5ddfaa2-53de-40db-83f3-467914b4aeac}"
remotable="False">
<!-- boilerplate registration/unregistration logic -->
<script language="VBScript">
<![CDATA[
strComponent = "MyComponent"
Function Register
MsgBox strComponent & " - Script Component registered."
End Function
Function Unregister
MsgBox strComponent & " - Script Component unregistered."
End Function
]]>
</script>
</registration>
<public>
<method name="ValidateEmail">
<parameter name="emailAddress"/>
</method>
</public>
<script language="Javascript">
<![CDATA[
function ValidateEmail(emailAddress) {
.... implementation here ...
}
]]>
</script>
</component>
</package>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.