I have a field like Input text I want that that field conatin or not these charcters $,#,*,
So far there is some problem in my jsfiddle.net account.So I am not posting any jsfiddle.net
I want that field should validate using pure JS not any JQuery and other libraray
See if a js code something like this might help for pure js validation.
<scrindent preformatted text by 4 spacesipt type=“text/javascript”>
function validate()
{
alert(“Please Enter required fields”);
var ctr = 0;
debugger;
var name=document.getElementById(‘username’).value;
if(name==“”)
{
alert(“For completing the form, it requires you to input a Name”);
document.getElementById(‘username’).style.border=“1px solid red”;
document.getElementById(“username”).innerHTML=(“Enter the Name”);
return false;
}
if(document.getElementById(‘Address’).value==“”)
{
alert(“For completing the form, it requires you to input a Address”);
document.getElementById(‘Address’).style.border=“1px solid red”;
document.getElementById(“Address”).innerHTML=(“Enter the Address”);
return false;
}
@skymodigiworld
Thanks for your effort
but You do not get still my point
I am not looking for supporting charcters
I want whethar a particular field contain some symbol in it or not like suppose “123456&&” I want to check on this that it contains some symbols in it or not