JavaScript Input content change
Input content change
<script type="text/javascript">
function changeText(newText) {
elem = document.getElementById("para1");
elem.value = newText;
}
</script>
</head>
<body>
<input id="para1" value='Some text here'>
<button onclick="changeText('newtext');">blue</button>
<button onclick="changeText('othertext');">red</button>
</body>
</html>