document.write в iGoogle? - PullRequest
       9

document.write в iGoogle?

0 голосов
/ 18 ноября 2010

Я ищу 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>

1 Ответ

1 голос
/ 18 ноября 2010

Просто заключите код в тег Content [type = html] с CDATA

<?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>
...