我的方法

<href="#" onclick="document.getElementById('body').focus();document.getElementById('title').value='回复:<{$i+1}>楼';">回复</a>

document.getElementById('body').focus()//设置鼠标焦点

document.getElementById('title').value//设置title的值 ,也可以document.getElementById('title').innertext

 

JQUERY

function cmtreply(name)
{
  $(
"#content").val('回复'+name+':');
  window.location.hash
="#cmt_form";
  $(
"#content")[0].focus();
}


相关文章:

  • 2021-08-25
  • 2022-12-23
  • 2022-12-23
  • 2021-06-08
  • 2021-07-10
  • 2021-12-01
  • 2022-02-23
  • 2022-12-23
猜你喜欢
  • 2021-09-30
  • 2022-12-23
  • 2022-12-23
  • 2021-06-05
  • 2021-12-19
  • 2022-12-23
  • 2022-01-07
相关资源
相似解决方案