hi
I'm programmer in php . when i click on my button ,i want to post a string like ( a + b) by javascript but it acts like concat and it posts ( a b) !
i want to show me plus symbol ( a + b) .
In Fact I don't want to write a function . I want to replace the +'s with the HTML equivalent string &#43 .how can i do this?

Wrong forum, this is JAVA, If you would have cared to look there is a separate Javascript forum in the Web Development section.

Now as far as your problem goes, "+" is a concatenation operator (if the first operand is a String) in Javascript. So a+b would concatenate the two.
Now if I am not wrong in JavaScript just like Java to display a + b , you will need to do some thing like a + "+" + b

Request to move the post submitted...

PS: Shame on PHP dude for not knowing difference between Java and JavaScript

commented: How could I have missed to add any taunts in my post . . . . good thing you filled the gap :P +3
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.