0 Reputation Points
100% Quality Score
- Upvotes Received
- 2
- Posts with Upvotes
- 2
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
1 Endorsement
Ranked #860
Ranked #72.9K
2 Posted Topics
Is the HTML in a string or part of the DOM? If a string, I think the best method would be to change it to nodes via `.innerHTML` on a temporary parent tag (like a `div`). Then you extract the Nodes through `.firstChild`. var tmpDiv = document.createElement('div'); tmpDiv.innerHTML= '<div><a href="#"></a><span></span></div>'; …
You do not include any code, so it's difficult to see what you've tried and how far or how close you've got. In js, you can include php variables like this: var jsId = "<?=$id?>"; or full tags: var jsId = "<?php echo $id; ?>"; You can then have a …
The End.