新建问卷页面添加问卷描述提示文字

This commit is contained in:
cxt 2015-09-22 09:47:39 +08:00
parent 8883093b96
commit 83e2a4b5bd
1 changed files with 18 additions and 0 deletions

View File

@ -22,3 +22,21 @@
<div class="cl"></div>
</div><!--编辑头部 end-->
<% end%>
<script type="text/javascript">
$(function(){
if($('#polls_description_div').html().trim() == '') {
$('#polls_description_div').html("<p style='color:#999999'>问卷描述</p>");
}
});
$('#polls_description_div').focus(function(){
//alert($('#polls_description_div').html().trim());
if(/^\s*<\w*\s*\w*\=\"\w*\:\s*\#\d*\"\>[\u4e00-\u9fa5]*<\/\w*\>\s*$/.test($('#polls_description_div').html().trim())) {
$('#polls_description_div').html('');
}
}).blur(function(){
if($('#polls_description_div').html().trim() == '') {
$('#polls_description_div').html("<p style='color:#999999'>问卷描述</p>");
}
});
</script>