就像咱们在这里回贴或发贴的时候,点击表情之后,自动赋值给编辑区,能够多次赋值的那种,急用啊,谢谢!!!
有例子源码吗?
function AddFace(FaceId)
{
document.form.Content.value=document.form.Content.value+"FaceId"
}
</script>
form的名称要对应好...和input的名字
链接用javascript:AddFace(15);
还有一点不明白,看看代码里红色部分写什么呢?
[CODE]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<script language="javascript">
function AddFace(FaceId)
{
document.form2.mark.value=document.form1.这里怎么写.value+"FaceId"
}
</script>
<body>
<table width="600" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><form id="form1" name="form1" method="post" action=""><table width="200" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/0.gif" alt="0.gif" style="margin:6px;cursor: pointer;" onclick="AddFace('em02');" />
<img src="images/1.gif" alt="1.gif" style="margin:6px;cursor: pointer;" onclick="AddFace('em02');" />
<img src="images/2.gif" alt="2.gif" style="margin:6px;cursor: pointer;" onclick="AddFace('em02');" />
<img src="images/3.gif" alt="3.gif" style="margin:6px;cursor: pointer;" onclick="AddFace('em02');" /></td>
</tr>
</table>
</form></td>
<td><table width="300" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><form id="form2" name="form2" method="post" action="">
<input name="mark" type="text" id="mark" size="40" style="height:40px">
</form>
</td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
[/CODE]
[此贴子已经被作者于2007-6-26 17:56:36编辑过]