How to transfer the id of a button to another page upon clicking on it?

  • 0
    Good day! Could you tell me how to transfer the id of a button to another html page by clicking on it?
    That is, there is a short description of the brands and models of the car in the main menu, but you need to click on the characteristics button to open separately one html page on which the information on the car was "rendered", Let's say you clicked on the characteristics of the volvo s60 then information on this model is displayed clicked different model displays different information. And it turns out that the information about each machine is rendered differently, but in one html file, I understand that it is necessary for the buttons to have different id, then by clicking on the id button, the button should be transferred to another page, the other page receives the id. Well, the necessary information is rendered by the id number, if in short I want to implement the SPA principle, but I don’t know how if it is impossible to implement by id, then tell me how and through what methods, etc. + I was also prompted that "the principle of Single Page Application, when there is 1 page and content is rendered on it as needed. For product detailing, you can make one more node (another block in html), into which you can render detailing data. When needed will return the list of products, then we clean the node with the detail data and render the list of products to another node (the block in html responsible for the list of products). It will be much more convenient to do this on frameworks) - but to be honest, I don’t know how to implement this hint either Thanks in advance for your help !!
    JavaScript Chloe Wiley, Sep 15, 2019

  • 1 Answers
  • 0
    I'm trying to figure out what you don't know about now.

    in my opinion about how dynamic pages are generally made.



    And here it is not possible for you to give a short answer since there is no information about the backend.



    A classic for PHP files

    it seems to you that this is a static page, but it is collected on the fly from the data and the page template.

    //site/page.html?id=1

    those. you just make a regular link. the required information will be inserted into the template by the script on the server



    On node.js, scripts also collect a finished page on the server. Javoscript runs on the server side.



    Something from reactive technology.

    the browser downloads a large js file

    the home of the page is going to be client-side. the server acts as a data provider through api methods
    Aidan Krueger

Your Answer
To place the code, please use CodePen or similar tool. Thanks you!