0

window.open(url) で開くリモート URL があります。そのページにはテキストエリアがあり、そのテキストエリアの値を親ページから変更したいと考えています。

window.open("http://facebook.com/share.php?u=
                http://something.com&t="+txt,'facebook','height=400,width=550'); 

$("textarea#u_0_6").val('test');

ありがとうございました

4

1 に答える 1

0

多分あなたはこのようにそれをすることができます。メソッドは非常に単純で、そのようなハッシュ(#)を使用して値を転送できます。

window.open("http://facebook.com/share.php?u=
                http://something.com&t="+txt+"#this is my textarea value",'facebook','height=400,width=550'); 

 $(function() {
   var MyTextAreaValue = window.location.hash;
   $('#u_0_6').val(MyTextAreaValue);
 });
于 2013-02-22T12:24:54.723 に答える