javascript onpropertychange

javascript onpropertychangeNewDocument functioninit() { all_real(); } functionall_real() { varbasePay=document.all("hrSalary.basePay").value; vartextf…

大家好,又见面了,我是你们的朋友全栈君。<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.0 Transitional//EN”>

<HTML>

<HEAD>

<TITLE> New Document </TITLE>

<META NAME=”Generator” CONTENT=”EditPlus”>

<META NAME=”Author” CONTENT=””>

<META NAME=”Keywords” CONTENT=””>

<META NAME=”Description” CONTENT=””>

</HEAD>

<script>

function init()

{

all_real();

}

function all_real()

{

var basePay = document.all(“hrSalary.basePay”).value;

var textfield2 = document.all(“textfield2”).value;

var textfield3 = document.all(“textfield3”).value;

var textfield100 = document.all(“textfield100”).value;

var textfield4 = document.all(“textfield4”).value;

var textfield5 = document.all(“textfield5”).value;

document.all(“textfield9”).value = all_earning(basePay,textfield2,textfield3,textfield100);

document.all(“textfield10”).value = all_pay(textfield4,textfield5);

document.all(“textfield11”).value = all_sub(document.all(“textfield9”).value,document.all(“textfield10”).value)

}

function all_earning(arg1,arg2,arg3,arg4)

{

var r1,r2,r3,r4,m;

try{r1=arg1.toString().split(“.”)[1].length}catch(e){r1=0}

try{r2=arg2.toString().split(“.”)[1].length}catch(e){r2=0}

try{r3=arg3.toString().split(“.”)[1].length}catch(e){r3=0}

try{r4=arg4.toString().split(“.”)[1].length}catch(e){r4=0}

m=Math.pow(10,Math.max(r1,r2,r3,r4))

return (arg1*m+arg2*m+arg3*m+arg4*m)/m

}

function all_pay(arg1,arg2)

{

var r1,r2,m;

try{r1=arg1.toString().split(“.”)[1].length}catch(e){r1=0}

try{r2=arg2.toString().split(“.”)[1].length}catch(e){r2=0}

m=Math.pow(10,Math.max(r1,r2))

return (arg1*m+arg2*m)/m

}

function all_sub(arg1,arg2)

{

var r1,r2,m;

try{r1=arg1.toString().split(“.”)[1].length}catch(e){r1=0}

try{r2=arg2.toString().split(“.”)[1].length}catch(e){r2=0}

m=Math.pow(10,Math.max(r1,r2))

return (arg1*m-arg2*m)/m

}

</script>

<BODY οnlοad=”init()”>

<table width=”98%” border=”0″ align=”center” cellpadding=”0″ cellspacing=”0″ class=”transparence”>

<td class=”GridShowList”>

基本工资

</td>

<td class=”GridWriterList”>

<input name=”hrSalary.basePay” value=”1000″ type=”text” size=”20″ onpropertychange=”all_real()”>

</td>

<td class=”GridShowList”>

岗位工资

</td>

<td class=”GridWriterList”>

<input name=”textfield2″ value=”1100″ type=”text” size=”20″ onpropertychange=”all_real()”>

</td>

</tr>

<tr>

<td class=”GridShowList”>

绩效工资

</td>

<td class=”GridWriterList”>

<input name=”textfield3″ value=”1200″ type=”text” size=”20″ onpropertychange=”all_real()”>

</td>

<td class=”GridShowList”>

加班

</td>

<td class=”GridWriterList”>

<input name=”textfield100″ value=”1300″ type=”text” size=”20″ onpropertychange=”all_real()”>

</td>

</tr>

</table>

———————————————————————————————————————————-

<table width=”98%” border=”0″ align=”center” cellpadding=”0″ cellspacing=”0″ class=”transparence”>

<tr>

<td class=”GridShowList”>

税金

</td>

<td class=”GridWriterList”>

<input name=”textfield4″ value=”100″ type=”text” size=”20″ onpropertychange=”all_real()”>

</td>

<td class=”GridShowList”>

养老保险

</td>

<td class=”GridWriterList”>

<input name=”textfield5″ value=”200″ type=”text” size=”20″ onpropertychange=”all_real()”>

</td>

</tr>

</table>

——————————————————————————————————————————————-

<table width=”98%” border=”0″ align=”center” cellpadding=”0″ cellspacing=”0″ class=”transparence”>

<tr>

<td class=”GridShowList”>

应发工资合计

</td>

<td class=”GridWriterList” colspan=”3″>

<input id=”sumPay” name=”textfield9″ value=”” type=”text” readonly=”true”>

</td>

<td class=”GridShowList”>

扣款合计

</td>

<td class=”GridWriterList” colspan=”3″>

<input id=”subPay” name=”textfield10″ type=”text” readonly=”true” >

</td>

<td class=”GridShowList”>

实发工资合计

</td>

<td class=”GridWriterList” colspan=”3″>

<input id=”real” name=”textfield11″ type=”text” readonly=”true”>

</td>

</tr>

</table>

</BODY>

</HTML>

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/158419.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • js传参数到另一个页面_jquery json字符串转换json对象

    js传参数到另一个页面_jquery json字符串转换json对象我是MVC3和Razor的新手,一旦从AJAX发布返回数据,就需要绑定/加载WebGrid的帮助。任何帮助将不胜感激(项目截止日期很快临近);)我的情况是这样的:我有两个级联的下拉列表。第一个列表包含数据库中的区域。选择区域后,它将在第二个下拉列表中填充一系列设施。选择设施后,我需要使用建筑物列表填充WebGrid。我的级联下拉菜单正常工作Index.cshtml:@usingThisContr…

    2022年10月6日
    3
  • MySQL中聚集索引、非聚集索引、联合索引、覆盖索引[通俗易懂]

    MySQL中聚集索引、非聚集索引、联合索引、覆盖索引[通俗易懂]在《面试官:为啥加了索引查询会变快?》一文中,我们介绍了索引的数据结构,正是因为索引使用了B+树,才使得查询变快。说白了,索引的原理就是减少查询的次数、减少磁盘IO,达到快速查找所需数据的目的我们一起来看一下InnoDB存储引擎中的索引聚集索引聚集索引(clusteredindex)就是按照每张表的主键构造一棵B+树,同时叶子节点中存放的即为整张表的行记录数据,也将聚集索引的叶子节点称为数据页。聚集索引的这个特性决定了索引组织表中数据也是索引的一部分(备注:真实的B+树叶子节点是通过链表相连的,

    2022年6月4日
    42
  • <HTML>简单登录页面代码

    <HTML>简单登录页面代码简单登录HTML

    2022年6月14日
    27
  • 视差Disparity与深度图

    视差Disparity与深度图转自:http://www.elecfans.com/d/863829.html双目立体视觉,在百度百科里的解释是这样解释的:双目立体视觉(BinocularStereoVision)是机器视觉的一种重要形式,它是基于视差原理并利用成像设备从不同的位置获取被测物体的两幅图像,通过计算图像对应点间的位置偏差,来获取物体三维几何信息的方法。一、视差Disparity与深度图提到双目视觉就不得不提视差图:双目立体视觉融合两只眼睛获得的图像并观察它们之间的差别,使我们可以获得明显的深度感,建立特征间的对

    2022年4月25日
    49
  • 乌云漏洞平台官网_bug漏洞平台

    乌云漏洞平台官网_bug漏洞平台前期准备乌云资源文件下载地址:https://github.com/m0l1ce/wooyunallbugs将下载的乌云数据库文件、网页等内容全部下载下来,最终内容如下phpstudy下载:https://www.xp.cn/download.html下载phpstudy,目前最新版本是V8.1,直接安装就可以。环境搭建创建网站首先创建一个自己喜欢的域名,注意PHP版本需要是5.3的版本,默认的7版本不支持相关的语法。第二个域名设置为static.loner.fm将bugs.rar解

    2025年8月10日
    3
  • laravel-admin 报错 Disk [admin] not configured, please add a disk config in `config/filesystems.php`….

    laravel-admin 报错 Disk [admin] not configured, please add a disk config in `config/filesystems.php`….

    2021年10月30日
    65

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号