<input type="text" value="<script>alert(1)</script>" onclick=" (value.indexOf('script') != -1) ? alert('есть script') : alert('нет script')" />