110,537
社区成员
发帖
与我相关
我的任务
分享
<script language="VBscript">
Function sdWriteCardp(UserID,BuyPower,sData,PtcType,FlagInfo)
dim ReCode
MsgBox Cstr(UserID)
MsgBox BuyPower
MsgBox sData
MsgBox PtcType
MsgBox FlagInfo
SDUSB.WriteCard FlagInfo, BuyPower, UserID, PtcType ,sData , ReCode
document.getElementById("iReCode").value=ReCode;
End Function
</script>
<input type="hidden" id="iReCode" name="iReCode" value="">
private void Button6_Click(object sender, System.EventArgs e)
{
int FlagInfo =0;
double BuyPower=29.68;
string UserID = "0000000101";
string sData ="123456";
int PtcType =1;
string ss=" <script language='VBscript'> Call sdWriteCardp(\""+UserID+"\","+BuyPower.ToString()+
",\""+sData+"\","+PtcType.ToString()+","+FlagInfo.ToString()+") <" + "/script>";
//调用前台代码
Page.RegisterStartupScript("ccsdWriteCard",ss);
if(this.iReCode.value="0")//此处无法正确拿到本次调用VBS iReCode
{
//成功
}
}