0

i want to get the value of this element var value = $('.question-label active').eq(2).text(); for the first iframe but i cannot get the value

<!DOCTYPE html>
<html>
<body>

<p>Click the button to change the location of the first iframe element (index 0).</p>

<button class="godd" onclick="myFunction()">Try it</button>
<br><br>

<iframe src="http://localhost:8005/?xform=http://127.0.0.1:8080/output_path4fff"></iframe>
<iframe src="http://localhost:8005/?xform=http://127.0.0.1:8080/output_path4fff"></iframe>

<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script>
function myFunction()   {  /* myfunction declaration */
  var value = $('.question-label active').eq(2).text();
  window.frames[0].top.location.href  = 'http://' +  value  ;
};
$(document).ready(function(){  /* DOM ready callback */

});
</script>

</body>
</html>

please help

user7412219
  • 134
  • 1
  • 3
  • 11

0 Answers0