function comment_image() { var URL = prompt('请输入图片的网络地址:'); if (URL) { document.getElementById('comment').value = document.getElementById('comment').value + '[img]' + URL + '[/img]'; }}