ForNow
This commit is contained in:
@ -56,6 +56,12 @@
|
||||
<input type="text" name="textimput" id="themodifierinputtext" value="Alapszöveg!">
|
||||
<p id="modifiedoutput"></p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h1>MethodChaining</h1>
|
||||
<input type="button" value="BEGIN THE QUESTIONING!!!" id="MethodChaining">
|
||||
|
||||
</div>
|
||||
<script src="script.js"></script>
|
||||
</body>
|
||||
</html>
|
@ -69,11 +69,18 @@ document.addEventListener("DOMContentLoaded", function() {
|
||||
out.innerHTML += "Replace letter 'a' with 'o': " + text.replaceAll("a", "o") + "<br>";
|
||||
out.innerHTML += "Fill till 15 with 'o': " + text.padStart(15, "o") + "<br>";
|
||||
out.innerHTML += "Fill till 15 with 'o': " + text.padEnd(15, "o") + "<br>";
|
||||
out.innerHTML += "Slice: " + text.slice(0, 3) + "<br>";
|
||||
}else{
|
||||
out.innerHTML = "";
|
||||
}
|
||||
};
|
||||
|
||||
document.getElementById("MethodChaining").onclick = function(){
|
||||
let name = window.prompt("Please enter your gorgeous name!!");
|
||||
username = username.strim()
|
||||
}
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user