日期:2014-05-20 浏览次数:20714 次
<li><a href="javascript:;" class="gr" onclick="try{Quote(2);}catch(ex){};return false">引用</a></li>
------解决方案--------------------
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>新建网页 1 </title> <script type="text/javascript"> function quote(id){ var d = document.getElementById(id); document.getElementById("content2").innerHTML += " <fieldset> <legend>"+"主题"+" </legend>"+d.innerHTML+" </fieldset>"; document.getElementById("textarea").value+=" <fieldset> <legend>"+"主题"+" </legend>"+d.innerHTML+" </fieldset>"; } </script> </head> <body> <div > <input type=button value="引用" onClick="quote('content1')"> <div id="content1"> 111111111 </div> </div> <div id="div2"> <input type=button value="引用" onClick="quote('content2')"> <div id="content2"> </div> <p> </p> <form action="" method="post" name="form" id="form"> <label> <textarea name="textarea" id ="textarea"cols="120" rows="50"></textarea> </label> </form> <p> </p> </div> </body> </html>