37 lines
829 B
PHP
37 lines
829 B
PHP
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Emilio</title>
|
|
</head>
|
|
<body>
|
|
<h2>This is Emilio's Page</h2>
|
|
<p style='color: red;'>This is the page content</p>
|
|
<p id='second-paragraph'></p>
|
|
<input type='text' name='sampleText' id='sampleText' onchange="updateText(this.value)">
|
|
|
|
<?php
|
|
echo("<p>This is some PHP</p>");
|
|
?>
|
|
|
|
<button id='button1' onclick="AddText()"> Click Me </button>
|
|
|
|
<p id='new-text'>Original Text</p>
|
|
|
|
|
|
<script language= "JavaScript">
|
|
var sample = "This is some sample text";
|
|
var para = document.getElementById('second-paragraph');
|
|
para.textContent = sample;
|
|
|
|
function updateText(fieldText) {
|
|
alert(fieldText);
|
|
}
|
|
|
|
function AddText() {
|
|
alert('here');
|
|
document.getElementById('new-text').innerHTML = "This is some new text";
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|