JavaScript How to get the text from a div which has children in it text from which country,text message which,which text from

It's not very clean way, but try something like this :

//get all div's with Bio css class (You can change it)
var Class = document.querySelectorAll('.Bio');
var sp=document.getElementById('res');
var arr=[]; //I put result into array so You can use it where You need
for (var i=0; i < Class.length; i++) {
   for(var x=0;x<Class[i].childNodes.length;x++) {
     if(Class[i].childNodes[x].nodeValue==null) {
        //get value, innerHTML, from <b>
   			//res.innerHTML+=Class[i].childNodes[x].innerHTML+'<br>';
        arr.push(Class[i].childNodes[x].innerHTML);
        } else {
        //get div innerHTML (before,after every child node
        //res.innerHTML+=Class[i].childNodes[x].nodeValue+'<br>';
        arr.push(Class[i].childNodes[x].nodeValue);
        }
   }
}
//show result into that span
for(var i=0;i<arr.length;i++) {
res.innerHTML+=arr[i]+'<br>';
}
<div class="Bio">
My name is <b>John Doe</b> and I am coming from Texas
</div>

<div class="Bio">
My name is <b>Jean Frye</b> and I am coming from Alabama
</div>
<br><br>
<!-- I use this span to show result -->
<span id="res"></span>
Answer:1
var Class = document.querySelectorAll('div');

for (var i=0; i < Class.length; i++){
   var children = [];
   var boldText = Class[i].querySelectorAll('b')[0].innerText;
   var otherText = Class[i].innerText.split(Class[i].querySelectorAll('b')[0].innerText)

   children.push(otherText[0]);
   children.push(boldText);
   children.push(otherText[1]);

   console.log(children);
}

Output :-

["My name is ", "John Doe", " and I am coming from Texas"]

["My name is ", "Jean Frye", " and I am coming from Alabama"]

This might do the trick.

Answer:2

If the user selects drop down,flight no, only one text field and the corresponding label should come in. If the user selects drop down, all, many text fields should be generated such as for getting ...

If the user selects drop down,flight no, only one text field and the corresponding label should come in. If the user selects drop down, all, many text fields should be generated such as for getting ...

In my html page ther is one load-more class.<p class="load-more">Load more</p>. When user scroll down to this div i need to execute a function . For example i need to alert "Hi". For this ...

In my html page ther is one load-more class.<p class="load-more">Load more</p>. When user scroll down to this div i need to execute a function . For example i need to alert "Hi". For this ...

  1. jquery scroll not working
  2. jquery scroll not working on mobile
  3. jquery scroll not working in chrome
  4. jquery scroll doesn't work
  5. jquery scroll event not working
  6. jquery scroll function not working
  7. jquery scrolltop not working
  8. jquery scroll animate not working
  9. jquery window scroll not working
  10. jquery sortable scroll not working
  11. jquery scroll to element not working
  12. jquery window scroll not working in mobile
  13. jquery smooth scroll not working

I want the input type to be folder and not a single file. How can I select a folder instead of just a single file. Also how can I then access each file in that selected folder. I tried this to select ...

I want the input type to be folder and not a single file. How can I select a folder instead of just a single file. Also how can I then access each file in that selected folder. I tried this to select ...

I'm using Fabric.js and while I can remove single objects (with "Trash" button) but would like to be able to remove any selected objects. Currently when I select more than one object nothing is ...

I'm using Fabric.js and while I can remove single objects (with "Trash" button) but would like to be able to remove any selected objects. Currently when I select more than one object nothing is ...

  1. delete selected objects django
  2. delete selected objects
  3. qgis delete selected objects
  4. failed to delete selected objects arccatalog
  5. how to delete selected objects in excel
  6. blender python delete selected objects
  7. excel delete all selected objects
  8. fabric js delete selected objects