我正在寻找iGoogle小工具中的document.write()属性,我如何在iGoogle小工具中做下面的事情?换句话说,我希望在脚本中包含stdout var。
Example with 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>发布于 2010-11-18 15:00:04
只需使用CDATA将代码包含在内容标记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>https://stackoverflow.com/questions/4212333
复制相似问题