Could you share the solution of substring methods from the input string using HTML+Javascript ?
<!DOCTYPE html>
<html>
<body>
<input type="text" value="test"></input>
<button onclick="myFunction()" id="testCode">Click</button>
<script>
function myFunction() {
document.getElementById("testCode");
var res = substring(0, 5).value;
document.write(res);}
</script>
</body>
</html>