条形码生成

<!DOCTYPE html>

<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>Index</title>
<script src="~/Script/jquery-3.1.1.js"></script>
</head>
<body>
<div>
<input id="Text1" type="text" />
<input id="Button1" type="button" value="OK" onclick="tiao()" />
<img src="" alt="" id="erweima" />
</div>
</body>
</html>
<script>
function tiao() {
if ($("#Text1").val() != null) {
var url = "http://www.tec-it.com/online-demos/tbarcode/barcode.ashx?code=Code39&dpi=96&rotation=0&imagetype=gif&modulewidth=fit&data=" + $("#Text1").val();
document.getElementById("erweima").src = url;
}
}
</script>

posted on 2019-03-20 15:54  SuperGood  阅读(161)  评论(0编辑  收藏  举报