// 刷新验证码
$(document).ready(function() {
$('#chkcode').click(function() {
$(this).attr('src', '/2010common/image.aspx?' + Math.random());return false;; //这里必须加入随机数
});
$('#chkcode').mouseover(function() {
$(this).css('cursor', 'pointer');
});
});
$(document).ready(function() {
$('#rplsubmit').click(function() {
var rpltitle = $('#rpltitle').val();
var rplcontent = $('#rplcontent').val();
var rplchk = $('#rplchk').val();
if(rpltitle == '') {
alert('请输入回复标题');
$('#rpltitle').focus();
return false;
}
if(rplcontent == '') {
alert('请输入回复内容');
$('#rplcontent').focus();
return false;
}
if(rplchk == '') {
alert('请输入验证码');
$('#rplchk').focus();
return false;
}
});
});
function setretitle(reid)
{
var hiddentitle=document.getElementById('hiddentitle').getAttribute('value');
document.getElementById('rpltitle').setAttribute('value','回复#'+reid+':'+hiddentitle);
}
// 设置指定容器内的图片尺寸
// 图片最大的宽度
var max_image_width = 600;
$(document).ready(function() {
$('.notice img').each(function() {
if( $(this).width() > max_image_width ) {
$(this).height( $(this).height() * max_image_width / $(this).width() );
$(this).width( max_image_width );
}
});
});