code(obj) { obj.src='http://comment.chinanews.com.cn/comments/image.php?'+Math.random(1); } function checkvalidate() { if(document.getElementById('username').value == '') { alert('请填写署名!'); document.getElementById('username').focus(); return false; } if(document.getElementById('xspace-seccode').value == '') { alert('请输入验证码!'); document.getElementById('xspace-seccode').focus(); return false; } return true; } var seccode_displayed = 0; function f_focus() { s = getbyid('xspace-seccodeline'); if(seccode_displayed == 0) { s.innerHTML = ' '; seccode_displayed = 1; } //document.postform.message.value=''; //document.postform.message.select(); }