ドロップダウンが 1 つありますDataType。
そして1つのテキストボックス これは enter 用Regex Patternです。
私が/test/テキストボックスに入力している場合。
またはドロップダウンから選択しInt
、テキストボックスに入力して/[0-9]/
から間違ったパターンを選択しますcorrect pattern。
ここに私のフィドルリンクがあります
http://jsfiddle.net/VGF9B/2/
これは私のものですscript
var dropdownValue = 'selectValue';
$('select').change(function(){
dropdownValue = $(this).val();
});
$('#pattern').focusout(function(){
alert(dropdownValue);
var pattern = new RegExp($('#pattern').val());
alert(pattern);
});
どうすればそれが可能になりますか