显示Javascript的结果& Blogger博客中的HTML [英] Display Result of Javascript & HTML in Blogger Post
问题描述
这是javascript&我的HTML代码。
函数convertinput(){
document.getElementById('first')。value
var string = document.getElementById('first')。value
var newString =@@ [0:1:+ string +]]
document.getElementById('output') .value = newString
}
< input id =first>< / input>
< br>
< input id =output>< / input>
< br>
< input type ='button'onclick ='convertinput()'value ='convert'>
jsfiddle中的代码编辑器是 http://jsfiddle.net/FEC7S/3/
我想要这段代码显示在我的博客文章中,因为它在这里
http://www.trickiezone.com/2012/10/facebook-blue-text-generator-by.html
如果我将它嵌入我的博客通过jsfiddle或tinkerbin,整个网页都显示出来了。
我只需要将结果显示在我的博客文章中。
如何做到这一点?
我在博客中添加了工作演示:
$
1)登录到您的博客。
2)添加新的Post
3)粘贴此代码
< div dir = ltrstyle =text-align:left; trbidi 上 > =;
< br />
< script language =javascripttype =text / javascript>
函数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>
This is the javascript & html code i have.
function convertinput() {
document.getElementById('first').value
var string = document.getElementById('first').value
var newString = "@@[0:1: " + string + "]]"
document.getElementById('output').value = newString
}
<input id="first"></input>
<br>
<input id="output"></input>
<br>
<input type='button' onclick='convertinput()' value='convert'>
the code editor in jsfiddle is http://jsfiddle.net/FEC7S/3/
I want this code to be displayed in my blog post as it is here http://www.trickiezone.com/2012/10/facebook-blue-text-generator-by.html
If i embed it in my blog through jsfiddle or tinkerbin, the whole web page is getting displayed.
I need only the result to be displayed in my blog post.
How to do so ?
i have added the working demo in my blog:
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>
这篇关于显示Javascript的结果& Blogger博客中的HTML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!