0

の内部から div の高さを設定しようとしていiframeます。

私は次のようなものを持っています

<div id='test' style='height:150px;'>some stuff..</div>

<iframe id="test" src="http://www.myproject.com frameborder="0" scrolling="no">
   <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
   <title>test project</title>
   <link rel="stylesheet" type="text/css" href="g_reset.css">
   <script type="text/javascript" src="options.js"></script>
   </head>
   bunch of html...
   <a id='click' href='#'>click<a/>
</iframe>

内の「クリック」をクリックしたときに「テスト」divの高さを変更できるようにしたいiframe

私の中でoptions.js私は..

$('#click).click(function(){
   alert('pop')
   $('#test').attr('height','500');
})

アラートが表示されますが、高さは変わらないようですdiv。この問題について誰か助けてもらえますか? どうもありがとう!

4

2 に答える 2