I\'m developing website where user submit credentials using ajax,php and using POST method and i want to protect login credentials not in plain text but i don\'t want to use
In short .. no.
You can try but I don't think there is a method I can imagine in javascript or any other in-browser way to secure your posted data.
The problem is in the encryption side, doing a good strong public-private crypto in javascript doesn't sound feasible to me.
I'm also kind of curious about the why part . .
. . still pondering on some possible method. . will update post if something pops up.