I have the following script that grabs all the contents from my Intranet Home Page and displays it on a page.
I was wondering, is it possible to just get the value inside this element <div id="username">my.username</div> that is on my home page?
Current Code:
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
</head>
<script type="text/javascript">
$.get('http://intranet', function(data){
$(data).appendTo(document.body);
//$('#username').attr('id')
});
</script>
#usernametag inside the data?'http://intranet #username'<div id="username">my.username</div>