You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
1.8 KiB
HTML

5 years ago
<div id="add_content_box"><div style="max-width:640px;width:100%;margin:0 auto;"><header class="header header-btn"> <a class="xg-back" id="jsaddcontent" href="javascript:;"></a> <h1 class="xg-title">描述</h1> <button type="button" id="jsaddcontentbtn" class="xg-btn xg-btn-pill xg-btn-primary fr">保存</button></header><div style="line-height:1.1rem;">&nbsp;</div><main class="xg-main2 wrapper" style="position:relative;max-width:640px;margin:0 auto;"> <div class="xg-container2"> <form action="javascript:;" class="xg-form" onsubmit="return false;"> <textarea class="xg-textarea" id="content" placeholder="可以按照角色等级装备道具等10-100字内填写描述可以更快捷的完成交易喔"></textarea> </form> </div></main><div class="popmsg2 pop-dialog"></div><script> $(function() { var popmsg2 = $('.popmsg2').pop(); var t = $('#comfirm_sell input[name="content"]').val(); if(t) $('#content').val(t); $('#jsaddcontent').click(function() { var p = $('.popwin').fadeOut(200); setTimeout(function(){p.find('#add_content_box').remove();},210); return false; }); $('#content').keyup(function() { var that = $(this);var val = $.trim(that.val()); if(val.length>=100) {val = val.substr(0,100);that.val(val);popmsg2.msg('描述已达100字');return false;} return false; }); $('#jsaddcontentbtn').click(function() { var val = $.trim($('#content').val()); if(val.length<10) {popmsg2.msg('内容不少于10字');return false;} if(val.length >100) {popmsg2.msg('内容不能超过100字');return false;} $('#jssell_content').find('.gray_txt').addClass('xh_selected').text(val.length>18?(val.substr(0,18)+'...'):val); $('#comfirm_sell input[name="content"]').val(val); $('#jsaddcontent').click(); return false; }); });</script></div></div>