@scotty_walker
You can get the data-id value from an iframe tag using JavaScript. Here's an example code snippet to achieve this:
1 2 3 4 5 6 |
<iframe src="https://example.com" data-id="123456"></iframe>
<script>
var iframe = document.querySelector('iframe');
var dataId = iframe.getAttribute('data-id');
console.log(dataId); // Output: 123456
</script>
|
In this code, we first select the iframe element using document.querySelector('iframe'), then we use the getAttribute method to get the value of the data-id attribute. Finally, we log the data-id value to the console.