js04 HTML w pattern

by Professor Tom DeDonno

HTML

<form onsubmit="createRecommendation();return false;">
acres:
<input type="text" pattern="\d+"
title="positive acres"/>
<input type="number" min="1"
title="positive acres 1.." />
Months:
<input type="text" pattern="(1[0-2]|[1-9])"
 title="need months 1..12"  />
 <input type="number" min="1" max="12"
 title="need 1-12"/>
<input type="submit"
value="create Tractor Recommendation" />
</form>

CSS

input {display:block;}

JavaScript

function createRecommendation( )
{
alert( "working" );
return false;
}