SHARE
TWEET

Untitled

a guest Nov 8th, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html>
  2. <html lang="en">
  3.     <head>
  4.         <title>Business Card</title>
  5.         <script>
  6.         function displayBuisnessCardData(){
  7.             var xmldata1 = document.getElementById("xmaldata1");
  8.        
  9.             var bizCard = xmldata1.getElementsByTagName("BuisnessCard")[0];
  10.             var name = "Name: " + bizCard.getElementsByTagName("name")[0];
  11. firstChild.data;
  12.        
  13.        
  14.         }
  15.        
  16.        
  17.        
  18.         </script>
  19.  
  20.     </head>
  21.  
  22.     <body>
  23.         <xml id="xmldata1" style="display:none">   
  24.             <BusinessCard>
  25.                 <name>Jozef Kapusta </name>
  26.                 <phone type="mobile">(+421) 904 105 847 </phone>
  27.                 <phone type="home">(+421) 38 5 619 473 </phone>
  28.                 <phone type="work">(+421) 37 6 587 953 </phone>
  29.                 <email>jozo@mojmail.sk<email>
  30.             </BusinessCard>
  31.         </xml>
  32.         <button id="showBCardData" onclick="displayBusinessCardData()">Show Business Card Data</button>
  33.     </body>
  34. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top