实训项目序号只能输入数字或复制数字
This commit is contained in:
parent
e3d0551e51
commit
2aabaca9b6
|
@ -1,7 +1,7 @@
|
|||
<ul>
|
||||
<li class="clear">
|
||||
<label class="label"><span class="c_red f12">*</span> 序号 : </label>
|
||||
<%= f.text_field :position, :no_label => true, :placeholder => "请输入序号(整数)", :onkeyup => "this.value=this.value.replace(/\D/g,'')", :onafterpaste => "this.value=this.value.replace(/\D/g,'')" %>
|
||||
<%= f.text_field :position, :no_label => true, :placeholder => "请输入序号(整数)" %>
|
||||
</li>
|
||||
<li class="clear">
|
||||
<label class="label"><span class="c_red f12">*</span> 标题 : </label>
|
||||
|
@ -41,9 +41,17 @@
|
|||
<input onclick="issue_create();" class="sy_btn_blue mr5 fr" onfocus="this.blur()" id="issue_confirm" style="width: 28px;color: #FFF" value="保存">
|
||||
</li>
|
||||
</ul>
|
||||
<script>
|
||||
<script type="text/javascript">
|
||||
function issue_create(){
|
||||
training_task_desc_editor.sync();
|
||||
$('#project_training_form').submit();
|
||||
}
|
||||
$(function(){
|
||||
$("#training_task_position").bind('keyup', function (){
|
||||
this.value=this.value.replace(/\D/g,'')
|
||||
});
|
||||
$("#training_task_position").bind('afterpaste',function(){
|
||||
this.value=this.value.replace(/\D/g,'')
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue