Nearly encountered a problem, the news system all news is generated static, but I want to display the number of visits in the static page dynamic content, and pondered, there is no good solution. Today suddenly think, is it possible to solve through the frame page?
Summary of the basic ideas are as follows:
First open a static page similar to 20050120.html, which shows the news and other content, but also contains the number of visits, such as the following:
Source: Unknown release time: 2005-01-20 Hits: 21
So I'm going to include the above in a PHP program and then call this page with an IFRAME in the static page.
But now that we have a new problem, how can I submit the address of this static page and the corresponding variables to this frame page for processing?
Asked the master, using JS to deal with:
For example, Frame page ID is iframe, in large page iframe "). Form1.hidid= ' 20050120 '
Then how do I get this hidid= ' 20050120 ', also need to use JS, my idea is to use JS to get this page URL method, and then through regular expression to extract, such as my static page name is 20050120.html, Then I will extract 20050120, and then pass this value to Hidid, then the value passed to the frames page, the corresponding PHP program can be processed, and print the corresponding results.
I am not specific to achieve this way, but the basic ideas have.
There must be other methods, such as XMLHTTP, only the current knowledge is limited, can not be achieved, if there is a better solution to the master, please do not hesitate to inform!