Last active
July 21, 2017 15:06
-
-
Save Joseph7451797/ce5b575ef18133df7dabb62583db8bf1 to your computer and use it in GitHub Desktop.
JS Bin// source https://jsbin.com/pakota
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script src="https://code.jquery.com/jquery-3.1.0.js"></script> | |
<script id="jsbin-javascript"> | |
var str = '<div class="alice">123</div>'; // HTML string | |
var d = document.createElement('div'); // create HTML div | |
d.innerHTML = str; | |
var t = $(d).find('.alice'); | |
console.log(t.text()); | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">var str = '<div class="alice">123</div>'; // HTML string | |
var d = document.createElement('div'); // create HTML div | |
d.innerHTML = str; | |
var t = $(d).find('.alice'); | |
console.log(t.text()); // will log 123</script></body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var str = '<div class="alice">123</div>'; // HTML string | |
var d = document.createElement('div'); // create HTML div | |
d.innerHTML = str; | |
var t = $(d).find('.alice'); | |
console.log(t.text()); // will log 123 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment