Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

ASSIGNMENT DUE TODAY!!! In HTLML5/JAVASCRIPT/CSS write a script that inputs a do

ID: 3758381 • Letter: A

Question

ASSIGNMENT DUE TODAY!!!

In HTLML5/JAVASCRIPT/CSS write a script that inputs a dollar amount (using a button)to be printed on a check, then prints the amount in check-protected format with leading asterisks if necessary. Assume that nine spaces are available for printing the amount. AND write a script that inputs a numeric check amount (using a button)and writes the word equivalent of the amount. For example, the amount 112.43 should be written as ONE HUNDRED TWELVE and 43/100

This all should be one code in HTML5/JAVASCRIPT/CSS ONLY!!

Explanation / Answer

.currencyinput {
    border: 1px inset #ccc;
}
.currencyinput input {
    border: 0;
}


<span class="currencyinput">$<input type="text" name="currency"></span>
<button>Click me</button>

<script>
function myFunction() {
    var amount=document.getElementById("currency");
var size=amount.length;
if(size==1)
document.write("*********"+amount);
else if(size==2)
document.write("********"+amount);
<<Continue like this for all 9 Values>>
}
</script>