
<!--
window.open ('page.html', 'newwindow', 'height=100, width=400,
top=0,left=0, toolbar=no, menubar=no, scrollbars=no,
resizable=no,location=no, status=no')
//写成一行
-->
</script>
参数解释:
<script language="javascript">js脚本开始;
window.open d出新窗口的命令; '
page.html' d出窗口的文件名;
newwindow' d出窗口的名字(不是文件名),非必须,可用空''代替;
height=100 窗口高度; width=400 窗口宽度;
top=0 窗口距离屏幕上方的象素值;
left=0 窗口距离屏幕左侧的象素值;
toolbar=no 是否显示工具栏,yes为显示;
menubar,scrollbars 表示菜单栏和滚动栏。
resizable=no 是否允许改变窗口大小,yes为允许;
location=no 是否显示地址栏,yes为允许;
status=no 是否显示状态栏内的信息(通常是文件已经打开),yes为允许;
</script>js脚本结束
我记得/不用转义的来着。另外,楼主,你用google的ad服务应该是有限制的,我们这里只能保证javascript不出错,效果是看不到的。
我把你的javascript引用顺序调了一下,你再试试看。
----------------------------------
每个引号前加‘\’,换行的地方要添加引号。
get里面的代码改成:
document.write(
"<script type=\"text/javascript\" " +
"src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\">" +
"</script>" +
"<script type=\"text/javascript\">"+
"<!--google_ad_client = \"pub-9929749239266042\"" +
"google_ad_width = 468" +
"google_ad_height = 60" +
"google_ad_format = \"468x60_as\" +
"google_ad_type = \"text_image\"" +
"google_ad_channel = \"\""+
"-->" +
"</script>"
)
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)