62,243
社区成员




<script type="text/javascript">
function yinyong(id) {
document.forms.form1.FreeTextBox1.value = "回复:" + document.getElementById(id).parentNode.firstElementChild.textContent.replace(/^\s+|\s+$/g, "")
alert(document.forms.form1.FreeTextBox1.value);
}
</script>
<fieldset><legend class="font_bold">引用 楼主 zhentoufei 的回复:</legend><blockquote>我在网上看到了使用js做的,代码如下:</blockquote></fieldset>
这个 html 应该能看懂把?!
知道了这个 html 结构,那么内容也就很容易理解了。在提交(也就是页面底部的提交frame中)时得到的的内容中找到 <quote].....[/quote]对,然后立刻替换为相应的上述 html 呗。
对于数据库来说,可以保存提交时的 UBB 伪代码格式,也可以保存最终的 html 格式。由于提交时的 UBB 格式其实没有什么用处,所以我建议只保存 html 格式的内容。