日期:2014-05-16 浏览次数:20326 次
var flag=1;
function open_response(obj){
var Pnode=obj.parentNode;
if(flag%2)
{
var Cnode=document.createElement('div');
Cnode.id="response";
Cnode.innerHTML="<div align='center'><textarea name='response_comment' rows='5'></textarea></div>"+
"<div class='name'>用户名: <input type='text' name='response_name' style='width:80px' /> 邮箱: <input type='text' name='response_email'></div>"+
"<div>"+
"<input type='submit' name='response_submit' class='submit' value='回 复' />"+
"</div>"+
"<div style='clear:both'></div>";
Pnode.appendChild(Cnode);
Cnode.style.display=="block"?Cnode.style.display="none":Cnode.style.display="block";
flag=0;
}
else
{
close_response(Pnode)
}
}
function close_response(obj)
{
var Cnode_1=document.getElementById('response');
obj.removeChild(Cnode_1);
flag=1;
}