Skip to content Skip to sidebar Skip to footer

Display Result Of Javascript & HTML In Blogger Post

This is the javascript & html code i have. function convertinput() { document.getElementById('first').value var string = document.getElementById('first').value var

Solution 1:

i have added the working demo in my blog:

signed by miliodiguine

TO DO:

1)Login to your blog.

2)Add New Post

3)paste this code

<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<script language="javascript" type="text/javascript">
function convertinput() {
    document.getElementById('first').value
    var string = document.getElementById('first').value
    var newString = "@@[0:1: " + string + "]]"
    document.getElementById('output').value = newString
}
</script>

<input id="first"></input>
<br>
 <input id="output"></input>
<br>
<input type='button' onclick='convertinput()' value='convert'>
</div>

Solution 2:

You could use your id to set the display property in css...

function convertinput() {
    document.getElementById('output').value = "@@[0:1: " + document.getElementById('first').value + "]]";
   document.getElementById('output').style.display = 'block';
}



<input id="first"></input>
<br>
<input id="output" style="display:none;"></input>
<br>
<input type='button' onclick='convertinput()' value='convert'>

http://jsfiddle.net/FEC7S/7/


Post a Comment for "Display Result Of Javascript & HTML In Blogger Post"