私は、ページからdocument.write内のhtmlを取得し、別のページの新しいdivに追加したいと思います。ここに全面的なソースコードがあります。私はちょうど私が単純にコンテンツをロードしようとしたページの内容を取得し、スクリプトタグに追加します
タグにテーブルを取得し、
<html>
<head>
<link rel="alternate stylesheet" type="text/css" href="resource://gre-resources/plaintext.css" title="Wrap Long Lines">
</head>
<body cz-shortcut-listen="true">
<pre>document.write('<table align="center" cellspacing="1" class="report" id="livescoring"><caption><span>Live Scoring</span></caption><tbody><tr><th>Week 19</th></tr><tr class="oddtablerow"><td><a target="_blank" href="http://www03.myfantasyleague.com/2016/live_scoring_summary?L=75656&W=19">Live Scoring Summary</a>\
</td></tr><tr class="eventablerow"><td><a target="_blank" href="http://www03.myfantasyleague.com/2016/live_scoring?L=75656&W=19">Live Scoring Details</a>\
</td></tr></tbody></table>');
</pre>
</body>
</html>
iは「プレ」内で作成されたドキュメントの書き込みテーブルを取得したい#newDIVに追加したいのですが新しいDIV .LOADを使用して、それは
を動作しませんでしたので、それはこの
<div id="newDIV"><table align="center" cellspacing="1" class="report" id="livescoring"><caption><span>Live Scoring</span></caption><tbody><tr><th>Week 19</th></tr><tr class="oddtablerow"><td><a target="_blank" href="http://www03.myfantasyleague.com/2016/live_scoring_summary?L=75656&W=19">Live Scoring Summary</a>
ライブスコア詳細
のように新しいページにレンダリングされます10
質問を明確に書き換えることはできますか? –
マイケルに感謝しています。私はそうしました、もっと明確になることを願っています。 – MShack
私はこれをまっすぐにしてみましょう。ページが読み込まれた後、別のページに移動し、DOM要素をあなたとともに移送し、そのページの要素に追加したいとします。これでしょうか?それは私が一日中聞いた最も野性的なアイデアです。ここは一日中笑っています。それはseごとに行うことはできませんが、回避策があります。 –