asked on May 18, 2016
•
Show version history
Hello,
I am very new to javascript and I am attempting in Forms to use a regular expression to parse the last two digits of one field(#q139) and pass it to another(#q156). Can anyone see where I am going wrong?
$(document).ready(function () {
$('#q139').on("change", function() {
RegEx = (\d\d)\Z.exec('#q139');
temp = RegEx[1];
$('#q156').val(temp);
Thanks in advance!
0
0