this should work:
<form method="POST">
<input pattern="[^\\]+" name="pattern" value="" title="no backslash allowed">
<input type="submit">
</form>
live example: http://jsfiddle.net/cNWDM/1/
change [^\\]+
to [^\\]*
if you want to allow an empty field
still, i would strongly recommend that you check / convert the slashes server side, client side is good for usability but never safe