JSFiddle - React, Tailwind, and code Playground
HTML
<form>
<a href="#" rel="1 3 5 9 21 56 ">Anchor</a>
<input type="text" />
<input type="submit" />
</form>
JavaScript
$("input[type='submit']").click(function(){
var values = $("a").attr('rel');
var nikita = $("input[type='text']").val();
if ( values.match(nikita) ) {
alert('The id exists');
return false;
} else {
alert('OK');
return true;
}
});