I set the src attribute of the IFRAME using the attr method of jquery
$ ("#addOrUpdateIframe"). attr ("src", "http://blog.jb51.net/search.aspx?key=400");/clickable link View effect note number of pages (show first page data)
No problem, I got the result I wanted, but the following address dropped the arguments behind the key (the red font parameter was not taken)
$ ("#addOrUpdateIframe"). attr ("src", "http://blog.jb51.net/search.aspx?key=400&page=2");/clickable link to view effect Note Number of pages (show second page data)
Depressed, feeling very strange, with Firebug looked at the modified value, the problem found, jquery to the above address to become:
http://blog.jb51.net/search.aspx?key=400&page=2//clickable Link View Effect Note page (show first page data)
In the middle of a depression ......
Looking for a long time also did not find if the problem, how he will address the & to change to & it? I don't know what I'm doing.
Problem Solving Method:
is inadvertently put
$ ("#addOrUpdateIframe"). attr ("src", "http://blog.jb51.net/search.aspx?key=400&page=2");/clickable link to view effect Note Number of pages (show first page data)
Change into
$ ("#addOrUpdateIframe"). attr ("src", ' http://blog.jb51.net/search.aspx?key=400&page=2 ');//clickable link to view effect Note Number of pages (show second page data)
Notice the gray background, change the double quotes into single quotes, and solve the problem.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.