私Form1.jspは、私は私のform2.jspでjavascript関数でjavascript関数でJSPの別のページへ1ページからのiframeにアクセスする
function Hide() {
if(document.getElementById("results").style.display=="none") {
document.getElementById("results").style.display="block";
}
}
をiframeのIDをアクセスしたいのiframe
<iframe id="results" name="results" style="display: none;"
width="100%" height="240" frameborder="1"></iframe>
を持っています場所の結果の文字列でForm1.jspのiframe idにアクセスしたい
結果は何ですか?すべてのコンソールエラー? form2はどこですか? iFrameで?より多くのHTMLを投稿できますか?また、関数hideを呼び出しますが、それは表示されるはずです。テストがうまく動作するように、スクリプトでスタイルを設定したいかもしれません - 'console.log(document.getElementById(" results ")。style.display)'を実行して、期待していると "none" - ここで読む:http://stackoverflow.com/questions/4866229/can-you-check-an-objects-css-display-with-javascript – mplungjan
javascript関数、form2.jspのHide()iframeにアクセスしたいid in form1.jsp through javascript form2.jspのHide() –
http://stackoverflow.com/questions/23286619/how-to-pass-the-values-from-one-jsp-page-to-another-jsp -without-submit-button – Mahi