In this article we will learn about some of the frequently asked HTML programming questions in technical like “how to make option values contain spaces in html” Code Answer. When creating scripts and web applications, error handling is an important part. If your code lacks error checking code, your program may look very unprofessional and you may be open to security risks. Error or stack handling on html was simple and easy. An error message with filename, line number and a message describing the error is sent to the browser. This tutorial contains some of the most common error checking methods in HTML. Below are some solution about “how to make option values contain spaces in html” Code Answer.
how to make option values contain spaces in html
xxxxxxxxxx
1
You should wrap value of attribute value in quote(Quote It). If you do
2
not wrap them in quote then value after space will be considered as
3
attribute itself:
4
5
$("#<%=listBrand.ClientID%>").append("<option value='"+ item.Brand + "'>" + item.Brand + "</option>");