Skip to content

Commit

Permalink
Merge pull request #6 from sdeng238/shirley
Browse files Browse the repository at this point in the history
Update focus.js - set heading to text input
  • Loading branch information
adenjonah authored Feb 22, 2024
2 parents 95c2d34 + d5e60d0 commit afe939a
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 afe939a

Please sign in to comment.