Skip to content

Commit

Permalink
Update focus.js
Browse files Browse the repository at this point in the history
  • Loading branch information
sdeng238 committed Feb 22, 2024
1 parent 9181331 commit d5e60d0
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/pages/focus.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,19 @@ import React from 'react';
import './../pages-style/focus.css';

function focus() {
function setHeading()
{
// set IP address entered in input field as heading
let inputIPAddress = document.getElementById("ipaddress").value;
document.getElementById("headerToEdit").textContent = inputIPAddress;
}
return (
<div>
<h1>Focus</h1>
<h1 id="headerToEdit">Focus</h1>
<p>This page will be the landing page for the focus display, and should explain the point of the focus display</p>
<label htmlFor="ipaddress">IP Address: </label>
<input type="text" id="ipaddress" name="ipaddress"/>
<button onClick={setHeading}>OK</button>
</div>
);
}
Expand Down

0 comments on commit d5e60d0

Please sign in to comment.