<div id="example" data-payload="<b>hi</b>"></div>Element: getAttribute() method / notebook
Element: getAttribute() method
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.