点击一个button如何让另外一个对象内的html文本变为我指定的html代码?比如。。。 补充上面应该是<a href="#" onlclick="show()">点击</a>漏了 </a>了~~ 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 document.all('pri').innerHTML= "现<b>在的文本</b>" http://www.firehouse58.com/download/zips/dhtml2.ziphttp://www.firehouse58.com/download/zips/dhtml1.ziphttp://qc2000.533.net/wyzz.htmhttp://crob.myetang.com/html/html.htm 给你一个我以前回答过的一个pasteHTML的写法<div id=editer>用鼠标拖选一些文本,点击按钮加粗</div><input type=button value="bold selection" onclick="cc()"><script>function cc(){ var rng = window.document.selection.createRange(); if (rng!=null && rng.parentElement() == document.all.editer) { rng.pasteHTML(rng.text.bold()); }}</script> 在head放了个变量,在尾部弹出变量,怎么没反应呢??? 一道JS面试题,求解 javascript事件处理函数内的this指向问题 jquery选择器问题 【复制运算符=】 关于打开div的坐标显示问题 效果如看贴的时候 鼠标移到作者身上那样的效果 字符替换问题 iframe问题的困惑! 在checkbox列表中,按shift多选的问题。来者有分 为什么在设置TEXTAREA的属性时,在〈TABLE〉〈/TABLE〉中就可以,而在外面就不可以?具体看里面的代码。急啊!!!! 文件域里选择的文件大小在上传时怎样获得? 能否设置表格的固定行吗?
http://www.firehouse58.com/download/zips/dhtml1.zip
http://qc2000.533.net/wyzz.htm
http://crob.myetang.com/html/html.htm
<input type=button value="bold selection" onclick="cc()">
<script>
function cc()
{
var rng = window.document.selection.createRange();
if (rng!=null && rng.parentElement() == document.all.editer)
{
rng.pasteHTML(rng.text.bold());
}
}
</script>