html和js制作个人所得税表格,H5编写个税计算器(JS代码编写).doc

document.title="个税计算器";

//写头部内容。

var header=document.createElement("header");

header.innerHTML="个税计算器";

document.body.appendChild(header);

header.style.backgroundColor="blue";

header.style.height="50px";

header.style.textAlign="center";

header.style.fontSize="30px";

header.style.lineHeight="50px";

header.style.color="white";

//写输入框。

var form=document.createElement("form");

document.body.appendChild(form);

var input1=document.createElement("input");

form.appendChild(input1);

input1.type="text";

input1.placeholder="基本工资";

input1.style.width="100%";

input1.style.height="40px";

input1.style.marginTop="15px";

input1.style.fontSize="30px";

input1.innerHTML.placeholder="基本工资/计税";

var input2=document.createElement("input");

form.appendChild(input2);

input2.type="text";

input2.placeholder="绩效工资及工龄工资";

input2.style.width="100%";

input2.style.height="40px";

input2.style.marginTop="15px";

input2.style.fontSize="30px";

input2.style.placeholder="绩效工资/计税";

var input3=document.createElement("input");

form.appendChild(input3);

input3.type="text";

input3.placeholder="奖金及其它收入";

input3.style.width="100%";

input3.style.height="40px";

input3.style.marginTop="10px";

input3.style.fontSize="30px";

input3.style.placeholder="奖金/计税";

//写计算按钮

var button=document.createElement("button");

document.body.appendChild(button);

button.innerHTML="开始计算";

button.style.backgroundColor="lightskyblue";

button.style.textAlign="center";

button.style.fontSize="30px";

button.style.height="50px";

button.style.width="100%";

button.style.margin="10px auto";

//button.style.margin=""

//写主题内容

//定义一个主体区域用于存放主体内容。

var sec=document.createElement("section");

document.body.appendChild(sec);

//工资总额部分

var dl=document.createElement("dl");

sec.appendChild(dl);

var d

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值