There is a website A to find another website as an agent, insert your own ads on the agent's page. It provides a registration page to the agent, the agent is registered, it will get an ID and get the advertisement code that is marked as a tag.
The agent needs to do it just to insert this code into your own web page. Once someone click on this ad. Website A will pay for the agent Money.
So, how is this technology implementation? This is a topic that someone gave me, although it is not difficult, but I think it is very representative, so I can write it to everyone to do a reference.
related information
1. Document object in JavaScript. The most common way for Document is too Write. Document.write (STR) can write STR to your browser. In fact, Document.Write () and respose.write () are very similar, the difference is that response is an ASP object, written from Server to client, and Document is a browser object, which is written locally. (I am far -_- ||)