如何读取身份证信息,求救啊...大哥们 公司就给了我一个二代身份证读卡器,然后我在网上下了个驱动安装了,请问我还需要怎么弄。 在网上下了段代码,刷着没反应。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 代码如下<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Shenfenzhengduqu._Default" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>新中新二代证阅读器控件测试程序JavaScript</title><OBJECT ID="IDCard1" WIDTH=93 HEIGHT=125 codeBase="IDCardCom.CAB" classid="CLSID:7B4E34BA-C415-4388-B13C-184FDBD956F3"> <PARAM NAME="Visible" VALUE="-1"> <PARAM NAME="AutoScroll" VALUE="0"> <PARAM NAME="AutoSize" VALUE="0"> <PARAM NAME="AxBorderStyle" VALUE="1"> <PARAM NAME="Caption" VALUE="IDCard"> <PARAM NAME="Color" VALUE="4278190095"> <PARAM NAME="Font" VALUE="MS Sans Serif"> <PARAM NAME="KeyPreview" VALUE="0"> <PARAM NAME="PixelsPerInch" VALUE="96"> <PARAM NAME="PrintScale" VALUE="1"> <PARAM NAME="Scaled" VALUE="-1"> <PARAM NAME="DropTarget" VALUE="0"> <PARAM NAME="HelpFile" VALUE=""> <PARAM NAME="DoubleBuffered" VALUE="0"> <PARAM NAME="Enabled" VALUE="-1"> <PARAM NAME="Cursor" VALUE="0"> <PARAM NAME="HelpType" VALUE="1"> <PARAM NAME="HelpKeyword" VALUE=""></OBJECT><script type="text/javascript"> function SetPort_onclick() { var str; SynIDCard1.Port = document.all['Port'].value document.all['RETSTR'].value="端口设置为"+SynIDCard1.Port; } function Init_onclick() { var str=SynIDCard1.Init(); document.all['RETSTR'].value="初始化结果"+str; } function ReadCard_onclick()// alert(IDCard1.Syn_ReadMsg(1)); // alert(IDCard1.PhotoFileName); { document.form1.NameA.value=IDCard1.PeopleName; document.all['Sex'].value=IDCard1.Sex; document.form1.Nation.value=IDCard1.Nation; document.all['Born'].value=IDCard1.Born; document.all['Address'].value=IDCard1.Address; document.all['CardNo'].value=IDCard1.IDCardNo; document.all['Activity'].value=IDCard1.UserLifeBegin; document.all['PhotoName'].value=IDCard1.StrToJpg(IDCard1.PhotoStr); document.form1.aa.src=IDCard1.StrToJpg(IDCard1.PhotoStr) } function ReadSAMID_onclick() { var str=SynIDCard1.ReadSAMID(); document.all['RETSTR'].value=str; }</script></head><p></p><form method="POST" action="--WEBBOT-SELF--" name="form1"> <p> 姓 名:<input type="text" name="NameA" size="9"> <br> 性 别:<input type="text" name="Sex" size="9"> <br> 民 族:<input type="text" name="Nation" size="9"> <br> 出生日期:<input type="text" name="Born" size="20"> <br> 地 址:<input type="text" name="Address" size="44"><BR> 身份证号:<input type="text" name="CardNo" size="34"><br> 有 效 期:<input type="text" name="Activity" size="20"> <br> 发证机关:<input type="text" name="Police" size="54"><BR> 照片文件:<input type="text" name="PhotoName" size="54"><image name="aa" src=''> </p> <p> <br> 端 口 号:<input type="text" name="Port" size="10" value="1"><BR><BR> <input type="button" value="读身份证信息" name="ReadCardBtn" onclick="ReadCard_onclick()"></p></form></body></html> 不知道你贴这代码有何意义。。这怎么验证啊看看这个Inherits="Shenfenzhengduqu._Default" 自己断点调试吧 <OBJECT ID="IDCard1" WIDTH=93 HEIGHT=125 codeBase="IDCardCom.CAB" classid="CLSID:7B4E34BA-C415-4388-B13C-184FDBD956F3">这个里面的意思是什么... The <object> tag is used to include objects such as images, audio, videos, Java applets, ActiveX, PDF, and Flash into a webpage. activeX控件,可以操作本地资源 Jquery获取某个选中值得个数 点(回复)显示本留言的回复div 点别的区域div隐藏 的问题.. 50分求FX中滚动效果校正 属性和方法要怎么区别理解? 如何去空格并传中文参数? fieldset中设置legend的问题 <--求两段简单的代码--〉 求一focus函数 如何用JavaScript实现在线编辑表格--在線等! 简单版日历,请大家提意见 JS for循环中引用变量问题 框架集中对元素的访问的问题
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Shenfenzhengduqu._Default" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新中新二代证阅读器控件测试程序JavaScript</title>
<OBJECT ID="IDCard1" WIDTH=93 HEIGHT=125 codeBase="IDCardCom.CAB" classid="CLSID:7B4E34BA-C415-4388-B13C-184FDBD956F3">
<PARAM NAME="Visible" VALUE="-1">
<PARAM NAME="AutoScroll" VALUE="0">
<PARAM NAME="AutoSize" VALUE="0">
<PARAM NAME="AxBorderStyle" VALUE="1">
<PARAM NAME="Caption" VALUE="IDCard">
<PARAM NAME="Color" VALUE="4278190095">
<PARAM NAME="Font" VALUE="MS Sans Serif">
<PARAM NAME="KeyPreview" VALUE="0">
<PARAM NAME="PixelsPerInch" VALUE="96">
<PARAM NAME="PrintScale" VALUE="1">
<PARAM NAME="Scaled" VALUE="-1">
<PARAM NAME="DropTarget" VALUE="0">
<PARAM NAME="HelpFile" VALUE="">
<PARAM NAME="DoubleBuffered" VALUE="0">
<PARAM NAME="Enabled" VALUE="-1">
<PARAM NAME="Cursor" VALUE="0">
<PARAM NAME="HelpType" VALUE="1">
<PARAM NAME="HelpKeyword" VALUE="">
</OBJECT>
<script type="text/javascript">
function SetPort_onclick()
{
var str;
SynIDCard1.Port = document.all['Port'].value
document.all['RETSTR'].value="端口设置为"+SynIDCard1.Port;
}
function Init_onclick()
{
var str=SynIDCard1.Init();
document.all['RETSTR'].value="初始化结果"+str;
}
function ReadCard_onclick()
// alert(IDCard1.Syn_ReadMsg(1));
// alert(IDCard1.PhotoFileName);
{ document.form1.NameA.value=IDCard1.PeopleName; document.all['Sex'].value=IDCard1.Sex; document.form1.Nation.value=IDCard1.Nation; document.all['Born'].value=IDCard1.Born; document.all['Address'].value=IDCard1.Address;
document.all['CardNo'].value=IDCard1.IDCardNo;
document.all['Activity'].value=IDCard1.UserLifeBegin; document.all['PhotoName'].value=IDCard1.StrToJpg(IDCard1.PhotoStr);
document.form1.aa.src=IDCard1.StrToJpg(IDCard1.PhotoStr)
}
function ReadSAMID_onclick()
{
var str=SynIDCard1.ReadSAMID();
document.all['RETSTR'].value=str;
}
</script></head><p></p>
<form method="POST" action="--WEBBOT-SELF--" name="form1">
<p>
姓 名:<input type="text" name="NameA" size="9"> <br>
性 别:<input type="text" name="Sex" size="9"> <br>
民 族:<input type="text" name="Nation" size="9"> <br>
出生日期:<input type="text" name="Born" size="20"> <br>
地 址:<input type="text" name="Address" size="44"><BR>
身份证号:<input type="text" name="CardNo" size="34"><br>
有 效 期:<input type="text" name="Activity" size="20"> <br>
发证机关:<input type="text" name="Police" size="54"><BR>
照片文件:<input type="text" name="PhotoName" size="54"><image name="aa" src=''>
</p>
<p>
<br>
端 口 号:<input type="text" name="Port" size="10" value="1"><BR><BR>
<input type="button" value="读身份证信息" name="ReadCardBtn" onclick="ReadCard_onclick()">
</p>
</form></body></html>
自己断点调试吧