底下是製作引言回覆的範例
--------------------------------------------------------------------------------
<!DOCTYPE HTML>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript">
//function Reply設定()裡頭tt參數為接收值
function Reply(tt){
var Rtitle=tt;
//把tt寫入id為ReTitle的value裡面
document.getElementById('ReTitle').value = Rtitle;
}
</script>
</head>
<body>
<table>
<tr>
<td><p>我要回復這段</p></td>
<!-- 把值帶入Reply中 -->
<td><a href="#Reply" onclick=Reply("回復一段話");>回覆</a></td>
</tr>
<tr>
<td><input type="text" name="ReTitle" id="ReTitle" value=""/></td>
</tr>
</table>
</body>
</html>
沒有留言:
張貼留言