Вот так валидно?
page1.html
<script src="//ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<form>
<a href="page2.html" class="some" id="1223">Отправить</button>
</form>
<form>
<a href="page2.html" class="some" id="2324324">Отправить2</button>
</form>
<script>
$(document).ready(function(){
$('.some').click(function() {
localStorage.setItem("object", $(this).attr('id'));
});
});
</script>
page2.html
<script src="//ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<script>
if (localStorage.object == "1223"){
alert("true");
}else{
alert("false");
}
</script>