view src/test/upload.html @ 38:19269d18b949

sceditor work
author Franklin Schmidt <fschmidt@gmail.com>
date Fri, 05 Aug 2022 00:04:58 -0600
parents 1ce75c5ab0f7
children 1ac7aee13eca
line wrap: on
line source

<!doctype html>
<html>
	<head>
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<style>
			@import "/site.css";
		</style>
		<script src="/site.js"></script>
		<script>
			function uploaded(input,url,filename) {
				console.log(url);
				let a = document.querySelector('a');
				a.textContent = filename;
				a.setAttribute('href',url);
			}
		</script>
	</head>
	<body>
		<div content>
			<p>top</p>
			<p>
				<input type=file xaccept="image/*" onchange="upload(this,uploaded)">
				<button onclick="fileButtonClick(this)">Upload File</button>
			</p>
			<p><a></a></p>
			<p>bottom</p>
		</div>
	</body>
</html>