<html xmlns:namespace1 xmlns:namespace2> <button onclick="alert(document.namespaces.length);">Number of namespaces on the page</button> </body> </html>