写的简单JS例子

/* 点击默认文字清除 */
function clearText(obj)
{
  if (obj.value == "文明上网,理性发言")
  {
    obj.value="";
  }
}
/* DIV显示 */
function showReply(c_id)
{
  var reply_id;
  reply_id = document.getElementById("reply_" + c_id);
  reply_id.style.display = "block";
  return false;
}
/* DIV隐藏 */
function cancelReply(c_id)
{
  var reply_id;
  reply_id = document.getElementById("reply_" + c_id);
  reply_id.style.display = "none";
  return false;
}