One question per day _javascript. Using JS operation frameset Frameset object to implement shopping cart?

Source: Internet
Author: User

Specific requirements:

1. The framework contains the top and bottom two frames, the shopping cart, the following is a list of items, click on the product list to purchase, to achieve the increase in the number of items in the shopping cart and pass the product ID


Implementation ideas:

650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M01/87/5D/wKiom1feS4WQIzVgAABgmOvS57M372.png-wh_500x0-wm_3 -wmp_4-s_1536429410.png "title=" upload. PNG "alt=" Wkiom1fes4wqizvgaabgmovs57m372.png-wh_50 "/>


Specific code:

Shopping.html

<! DOCTYPE html>

Shoppingcart.html

<! doctype html>

productinfo.html

<! doctype html>


There are pictures and phases:

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M02/87/5B/wKioL1feTOqzKglZAACNrAaeX9s667.png-wh_500x0-wm_3 -wmp_4-s_2441330029.png "title=" Capture.png "alt=" Wkiol1fetoqzkglzaacnraaex9s667.png-wh_50 "/>


Summary description:

1. Each frame in the page has its own window object, saved in the Frames collection, and the variables or functions defined by all frame pages automatically become members of the corresponding frame window object

2. You can get the specified frame object through a special global object, the Self object always points to the current frame object, the top object always points to the outermost frame, the parent object always points to the upper frame object, and when the page has no frame, parent/top/ Self is equal to the Window object, which can be used for data communication before each frame is positioned.


This article is from the "ζ Automated operation and maintenance development Road ζ" blog, please be sure to keep this source http://xmdevops.blog.51cto.com/11144840/1853697

One question per day _javascript. Using JS operation frameset Frameset object to implement shopping cart?

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.