Document.write issues

前端 未结 3 498
借酒劲吻你
借酒劲吻你 2021-01-24 05:27

I am making a page where users can answer questions (using radio buttons) about a product they are selling back. When they hit a button at the bottom of the page, a price quote

3条回答
  •  隐瞒了意图╮
    2021-01-24 06:03

    You should reference the element, and set its content instead of using document.write.

    
    

    function getQuote(){
         this.firstChild.data = "Your Quote Is: $" + price + ".00";
    }
    

    If you want to write to a different element, you should select that element, and likely use the same technique.

提交回复
热议问题