-3
<html>
<head>
<script type="text/javascript">
function blz()
{
//alert("asdf");
//document.getElementById("link").innerHTML='https://www.facebook.com/dialog/feed?app_id=172099656214641&link='+encodeURI(document.getElementById("product").value)+'&picture=http%3A%2F%2Fsocial.gogmat.com%2Fimages%2Flogo_03.jpg&name='+encodeURI(document.getElementById("subject").value)+'&caption=Invitation%20to%20checkout%20product%20on%20Gogmat&description=Check%20this%20product%20on%20social.gogmat.com%20now.%0A'+encodeURI(document.getElementById("message").value)+'&message=Check%20this%20product%20on%20social.gogmat.com%20now.%0A'+encodeURI(document.getElementById("message").value)+'&redirect_uri='+encodeURI(document.getElementById("redirect").value);
document.getElementById("link").innerHTML=encodeURI("https://www.facebook.com/dialog/feed?app_id=172099656214641&link="+document.getElementById("product").value+"&picture=http%3A%2F%2Fsocial.gogmat.com%2Fimages%2Flogo_03.jpg&name="+document.getElementById("subject").value+"&caption=Invitation%20to%20checkout%20product%20on%20Gogmat&description=Check%20this%20product%20on%20social.gogmat.com%20now.%0A"+document.getElementById("message").value+"&message=Check%20this%20product%20on%20social.gogmat.com%20now.%0A"+document.getElementById("message").value+"&redirect_uri="+document.getElementById("redirect").value);
//document.getElementById('button1').href='https://www.facebook.com/dialog/feed?app_id=172099656214641&link='+encodeURI(document.getElementById("product").value)+'&picture=http%3A%2F%2Fsocial.gogmat.com%2Fimages%2Flogo_03.jpg&name='+encodeURI(document.getElementById("subject").value)+'&caption=Invitation%20to%20checkout%20product%20on%20Gogmat&description=Check%20this%20product%20on%20social.gogmat.com%20now.%0A'+encodeURI(document.getElementById("message").value)+'&message=Check%20this%20product%20on%20social.gogmat.com%20now.%0A'+encodeURI(document.getElementById("message").value)+'&redirect_uri='+encodeURI(document.getElementById("redirect").value);
}
</script>
</head>
<body>
<form action="#">
subject:<input type="text" id="subject" name="subject" value="" onkeyup="return blz()" /><br/>
personal message:<input type="text" id="message" name="message" value="" onkeyup="return blz()" /><br/>
select product for recommend:<input type="text" id="product" name="product" value="" onkeyup="return blz()" /><br/>
link return:<input type="text" id="return" name="return" value="" onkeyup="return blz()" /><br/>
<textarea id="link" name="link" rows="10" cols="40" readonly></textarea><br/>
<a id="button1" href="" target="_blank"><img src="http://social.gogmat.com/components/com_referal/assets/images/bg_send.gif" alt="send button" /></a><br/>
<input type="submit" />
</form>
</body>
</html>
什麼可能是這個問題,我面對上述代碼的問題,它不顯示錨標記的textarea或href部分內的文本,我完全混淆了第一個關於這方面的時間在JavaScript。javascript的小問題
謝謝,幫助我。 – user1026137
他確實有一個'
要設置
<textarea>
的價值,你更新其「價值」屬性:來源
2011-11-02 17:19:16 Pointy
仍然沒有成功與您的想法。但感謝回覆 – user1026137
嗯,它肯定有效,但你也必須做@silverstrike說的並且將你的'
相關問題