云题海 - 专业文章范例文档资料分享平台

当前位置:首页 > web开发基础

web开发基础

  • 62 次阅读
  • 3 次下载
  • 2025/6/5 14:23:08

3

7

2、用CSS+Div的方式实现如下网页,html文件和CSS文件的部分代码如下,请将其补充完整。

网页文件(index.htm)源码如下:

CSS文件(index.css)源码如下: @charset \/* CSS Document */ body{

margin:0; padding:0;

background-color:#fff; text-align:center; }

.banner{

width:1000px; height:110px; }

.logo{

width:200px; height:110px;

background-color:#9C6; float:left; }

.banner-intro{ width:800px; height:110px;

background-color:#F00; } .nav{

width:1000px; height:25px;

background-color:#00F; }

.content{

width:1000px; height:700px; }

.content_left{ width:200px; height:600px; float:left;

background-color:#0FF; }

.content_right{ width:800px; height:600px;

background-color:#C30; }

3、设计如下图所示的页面效果:要求:在前两个文本框中输入任意数字值,点击相应的运算按钮后,完成需要的运算。

脚本文件hanshu.js function cal(op) {

var n1,n2,res;

n1=parseFloat(document.getElementById(\ n2=parseFloat(document.getElementById(\ if(op=='+') res=n1+n2; if(op=='-') res=n1-n2; if(op=='×') res=n1*n2; if(op=='÷') res=n1/n2;

document.getElementById(\}

页面文件index.html:

函数的应用

Copyright © 云题海 All Rights Reserved. 苏ICP备16052595号-3 网站地图 客服QQ:370150219 邮箱:370150219@qq.com