Restrict First Character forward and backslash

by Rowan Hamilton

HTML

<body>
    <input type='text' id='fileName'/>
</body>

JavaScript

$("#fileName").on("keypress keyup",function(){
    if($(this).val() == '/'){
      $(this).val(''); 
    }
    if($(this).val() == '\\'){
      $(this).val(''); 
    }
});