0

document.write()iGoogle ガジェットでプロパティを探しています。iGoogle ガジェットで次のことを行うにはどうすればよいですか? つまり、スクリプトに stdout var が必要です。

document.write() の例

<html> <body>

<script type="text/javascript"> var firstname; firstname="Hege"; document.write(firstname); document.write("<br />"); firstname="Tove"; document.write(firstname); </script>

<p>The script above declares a variable, assigns a value to it, displays the value, changes the value, and displays the value again.</p>

</body> </html>
4

1 に答える 1

1

CDATA を使用して Content タグ [type=html] でコードを囲むだけです。

<?xml  version="1.0"  encoding="UTF-8"?>
<Module>
<ModulePrefs title="hello world example" />
<Content type="html"><![CDATA[
<html>
<body>
<script type="text/javascript">
var firstname;
firstname="Hege";
document.write(firstname);
document.write("<br />");
firstname="Tove";
document.write(firstname);
</script>
<p>The script above declares a variable,
assigns a value to it, displays the value, changes the value,
and displays the value again.</p>
</body>
</html>
 ]]></Content></Module>
于 2010-11-18T07:00:03.527 に答える