In: Computer Science
Using javascript, Display the following two statements about Plagiarism and Attendance in 2 paragraphs. Display a button “Switch paragraphs” between these two paragraphs. Whenever the user clicks the switch button, the 2 paragraphs switch their places. Plagiarism statement: I have read the policy for plagiarism at Wollongong University. I declare that this assignment solution is entirely my work. Button “Switch paragraphs” appears HERE. Attendance statement: I acknowledge that this assignment is scheduled to be marked in the computer lab in Week 8 and Week 9, and absence from the labs may result in zero mark.
<html>
<head>
<title>Button</title>
</head>
<body>
<script type="text/javascript">
function changeText(value) {
document.getElementById('pText2').innerHTML = " I have read the
policy for plagiarism at Wollongong University. I declare that this
assignment solution is entirely my work ";
document.getElementById('pText1').innerHTML = " I acknowledge that
this assignment is scheduled to be marked in the computer lab in
Week 8 and Week 9, and absence from the labs may result in zero
mark ";
}
</script>
<p id="pText1"> I have read the policy for plagiarism at
Wollongong University. I declare that this assignment solution is
entirely my work </p>
<input type="button" value="Switch paragraphs" id="b1"
onclick="changeText(this.value);"/>
<p id="pText2"> I acknowledge that this assignment is
scheduled to be marked in the computer lab in Week 8 and Week 9,
and absence from the labs may result in zero mark.</p>
</body>
</html>