1
I would like the page to be automatically clicked on the button fileToUpload, in the following code:
<body>
<form name="form5" id="form1" enctype="multipart/form-data" method="post" action="Upload.aspx">
<div>
<input type="file" name="fileToUpload" id="fileToUpload" onchange="fileSelected();" accept="image/*" capture="camera" />
</div>
<div>
<input type="button" onclick="uploadFile()" value="Upload" />
</div>
</form>
<!-- fiz esse código abaixo mas não funciona-->
<script type="text/javascript">
document.form5.getElementById("fileToUpload").click();
</script>
</body>
You are currently using pure Javascript or jQuery ?
– Edilson