<input type="text" placeholder="Create Password" id="text" readonly>
<script>
function copyPassword(){
var copyText = document.getElementById('text')
copyText.select()
copyText.setSelectionRange(0, 999)
document.execCommand("copy")
console.log(copyText);
}
</script>