this is a simple program where the first input set the text and the second and third inputs searchfor a word and replace it with another, I have fixed any errors brought to my attention by the console but with no errors immediately present it still does not work.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>string</title>
<link rel="stylesheet" href="styles.css">
<meta name="author" content="Dylan Handy">
<meta name="description" content="No purpose">
<meta name="keywords" content="fill, in, your, keywords, here">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Rock Salt">
</head>
<body>
<form>
<input id="inputbox" type="text" placeholder="Text goes here">
<button type="submit" onclick="plcr()">Submit</button>
<p id="textbox" style="background:rgb(160, 158, 158); height: 200px; width: 500px;" ></p>
<input id="search" type="text" placeholder="Search">
<input id="replace" type="text" placeholder="Replace">
<button type="submit" onclick="rplc()">Submit</button>
</form>
<script>
function plcr(){
"use strict";
var a = document.getElementById("inputbox").innerHTML;
console.log('a');
document.getElementById("textbox").innerHTML = a ;
// b.innerHTML =a;
}
function rplc(){
var b = document.getElementById("textbox").innerHTML;
var y = document.getElementById("textbox").innerHTML;
var x = document.getElementById("search").innerHTML;
if(y.contains(x)){
b.replace(y,x);
}
}
</script>
</body>
</html>