al poner algo en data=
en la etiqueta img
, te convierte a código de barras.
como hago que lo que tenga el input
se pase a ese data?
hice un script
pero no tengo ni idea de como pasarlo.
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<table>
<div id="h">
<tr>
<td style='padding:10px; text-align:center; font-size:15px; font-family:Arial,Helvetica;'>
<br/>
</td>
<td>
<label>Ingrese el documento que desea convertir</label>
<input type="text" name="texto" id="texto">
<img src='https://barcode.tec-it.com/barcode.ashx?data=&code=Code128&multiplebarcodes=false&translate-esc=false&unit=Fit&dpi=96&imagetype=Gif&rotation=0&color=%23000000&bgcolor=%23ffffff&qunit=Mm&quiet=0' alt='Barcode Generator TEC-IT'/>
<button onclick="convertir()">convertir</button>
</td>
</tr>
</div>
</table>
<script type="text/javascript">
function convertir() {
alert("Hello World!");
var conv = document.getelementbyid('texto').value;
}
</script>
</body>
</html>
getelementbyid
porgetElementById
– JackNavaRow el 12 sep. a las 16:48