1、首先做一个5*5的透明GIF文件,保存在“image”文件夹调用265天气预报,不显示链接
2、建一个“weather”HTM文件,代码如下:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>天气预报</title>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</style>
<script language="JavaScript" type="text/JavaScript">
document.oncontextmenu=new Function('event.returnValue=false;');
document.onselectstart=new Function('event.returnValue=false;');
//以上是禁止鼠标右键
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>
<body bgcolor="#FFF9EE">
<div id="Layer1" style="position:absolute; width:175px; height:54px; z-index:1; left: 0; top: 0;"><img src="image/weather.gif" alt="天气预报" width="190" height="54"></div>
<iframe src="http://weather.265.com/weather.htm" width="190" height="54" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" name="I1"></iframe>
</body>
</html>
3、调用代码:
<iframe src="weather.htm" width="190" height="54" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
这样就OK了。。。。
编程基础网
本文标题为:调用265天气预报,不显示链接
基础教程推荐
猜你喜欢
- JavaScript函数this指向问题详解 2023-08-12
- Ajax实现关键字联想和自动补全功能及遇到坑 2023-02-23
- AJAX实现数据的增删改查操作详解【java后台】 2023-02-23
- Ajax实现简单下拉选项效果【推荐】 2022-12-28
- vue在install时node-sass@4.14.1 postinstall:node scripts/build.js错误解决 2023-07-09
- 【vue】三种获取input值的写法 2023-10-08
- ajax异步加载图片实例分析 2022-12-18
- html网页中使用希腊字母的方法 2022-09-21
- 使用HTML5中postMessage知识点解决Ajax中POST跨域问题 2022-10-17
- JavaScript开发简单易懂的Svelte实现原理详解 2023-08-12
