私がベースで、ボタンの値を私の窓をリダイレクトしようとしているが、私は仕事"message": "Uncaught ReferenceError:myFunctionが定義されていません"?
を得ることができ、これは私のコード
<!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">
$(document).ready(myFunction() {
var Vp = $('.godd').eq(0).text();
window.frames[0].top.location.href = 'http://' + Vp;
})
</script>
</body>
</html>
ある
checkout this http://stackoverflow.com/questions/15171008/onclick-not-working-with-button – ricky