使用过的基础知识

1   $("#filterText").click(function () {
2         var v = $('#filtertype option:selected').val();
3         if (v == 'Index') {
4             $("#filterText").attr('pattern','^[A-Za-z]+$');
5         }
6     });
7     
View Code

//JQ设置H5中的正则表达式

posted on 2017-05-04 17:58  阿鄙  阅读(61)  评论(0编辑  收藏  举报