Sending data with ajax from a link? (Without using ExtJS, jQuery or similar libraries)
I have <a href="">follow me</a>开发者_运维知识库
and I want to send very simple post data to the page without reloading the page.
Edit: Oh, onlclick
will solve my problem. I've got it.
<a href="" onclick="alert('jjj');">follow me</a>
Look at jQuery Ajax
There are plenty of examples online similar to what you want to achieve.
I could write the code for you, but you will gain so much from trying it yourself (and your question was vague about what serverside language your using).
If you get stuck - edit your question with the code and we will be more than happy to help.
Use jQuery Ajax to post data without loading page.
If you really don't want to use jQuery and ajax, you might want to use an invisible iframe to send the data to. I recommend jQuery ajax though...
精彩评论