javascript - validate input for jquery -
i haven`t form, input html: <script src="index.js"></script> </head> <body> <p>name</p> <input type="text" size="15" id="title" placeholder="enter title" onclick="check(this)"> <p>description</p> <textarea rows="7" cols="20" id="description" placeholder="enter description"> </textarea> <p>price</p> <input type ="number" value="00.0" min="0" step="0.1" id="price"><br> <button id="add_new_product" >add new product</button><br> <a href="catalog.html">all product</a> </body> i must validate input on empty. js file: $(function(){ $('#add_new_product').click(function(){ var title = $("#title").val(); var description = $("#description").val...