私はファイルhttp://host1.com/links.txtを持っています
links.txtに含まれるもの:
com http://host1.com/1.jpg
info http://host1.com/2.jpg
org http://host1.com/3.jpg
ホストドメインに応じて、そのファイルからこのコードsrcリンクを挿入する必要があります。
a=document.getElementsByTagName('body')[0];
st='iframe';
r=st;
b=document.createElement(r);
b.src=**Here from links.txt**
b.width=300;b.height=300;b.marginHeight=10;b.marginWidth=10;b.frameborder=10;b.align='left';
a.appendChild(b);
たとえば、他に3つのサイトがあります
1. http://site1.com
2. http://site2.info
3. http://site3.org
各サイトのindex.phpに、そのiframeコードを配置する必要があります。ソースコードには次のものを配置する必要があります。
http://site1.com/index.php 私はb.src=http://host1.com/1.jpgを持っている必要があります
http://site1.info/index.php 私はb.src=http://host1.com/2.jpgを持っている必要があります
http://site1.org/index.php 私はb.src=http://host1.com/3.jpgを持っている必要があります
どうやってやるの?