PC OK / Phone No
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Select HTML Form Fields to Convert to PDF Form</title>
<style>
</style>
</head>
<body>
<input type="button" onclick="printDiv('print'); return false;" value="Print" />
<div id="print">
<form action="" method="post">
<input type="text" name="user_name" value="" />
<input type="Text" size="27%"/><br>
<input value="ชาย" type="radio">ชาย
<input value="หญิง" type="radio">หญิง<br>
<!--upload and display-->
<input type="file" id="upload"><br><br>
<img id="image" style="max-width:850px;"/>
<script>
upload.onchange = evt => {
const[img] = upload.files;
if(img) {
image.src = URL.createObjectURL(img);
}
}
</script>
</form>
</div>
<script>
function printDiv(divName) {
var printContents = document.getElementById(divName).innerHTML;
var originalContents = document.body.innerHTML;
window.print();
document.write(printContents);
}/*
function printDiv() {
var printContents = document.forms[0].elements[0].value + "<br>" + document.forms[0].elements[1].value + "<br>";
var originalContents = document.body.innerHTML;
document.write(printContents + originalContents);
}*/
</script>