nalyr
nalyr

Reputation: 151

how to define a value in a href link

var button = '<a href="ticket.html?id"+ 'id' data-ajax="false"><button class="btn">Book Now!</button></a>';

How do I define a value(id) in my a href link?

Upvotes: 4

Views: 152

Answers (1)

Bubbletea
Bubbletea

Reputation: 76

As Jérôme Teisseire said in a comment, try to edit this in your string

var button = '<a href="test.html?yourid=' + yourid + '" data-ajax="false"> 

Upvotes: 3

Related Questions