Menu
hi.
i am using javascript to compare two strings. it works well with normal strings. but when the strings contain “&” (e.g. & #1234 ; ), it does not work well.
code:
q = document.getElementById(“q”).value;
a = document.getElementById(“a”).value;
if (q == a)
document.formName.all(“check”).innerText = “correct”;
else
document.formName.all(“check”).innerText = “wrong”;
anyone have any idea to solve this problem.. thanks.