`
张玉龙
  • 浏览: 737244 次
  • 性别: Icon_minigender_1
  • 来自: 沈阳
社区版块
存档分类
最新评论

黄金 白银T+D 盈利计算器

 
阅读更多
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<title>计算器-[ZYL]</title>


</head> 
<div class="coverbox">

<div class="tools_mian_con">
<script language="javascript">
function areas_change(th){
 if(17==th){
 document.getElementById('area').value=document.getElementById('job').value;
 }
 else if(14==th)
 document.getElementById('area').value=document.getElementById('people').value;
 else if(19==th)
 document.getElementById('area').value=document.getElementById('commerce').value;
 else
 document.getElementById('area').value=document.getElementById('others').value;
}
function keyPress() {   
    var keyCode = event.keyCode;   
    if ((keyCode >= 48 && keyCode <= 57))   
    {   
        event.returnValue = true;   
    } else {   
        event.returnValue = false;   
    }   
}   //只能输入整数0-9
function cal(){

	var k=document.getElementById('trade').value;
    var s=document.getElementById('lists').value;
    var n=document.getElementById('grapnum').value;
	var a=document.getElementById('openprice').value;
	var b=document.getElementById('ordinaryprice').value;
	var p=document.getElementById('area').value;
	var z=n*k*b*s-n*k*a*s-n*k*a*p/10000-n*k*b*p/10000;
	
	
	var string =n+"*"+k+"*"+b+"*("+s+")  -  "+n+"*"+k+"*"+a+"*("+s+")  -  "+n+"*"+k+"*"+a+"*"+p/10000+"  -  "+n+"*"+k+"*"+b+"*"+p/10000+"  =  "+z;
	document.getElementById('show').value=z;
	document.getElementById('exp').innerHTML =string;
}


function del(){
	document.getElementById('ordinaryprice').value="";
	document.getElementById('show').value="";
	document.getElementById('exp').innerHTML ="";

}
</script>
<div class="menumain">
 
 
<div class="goldchart">
	<div class="tools_calc">
    	<p class="tools_calc_tit">计算器[ZYL]</p>
        <div class="tools_calc_panel">
        <table border="0" cellpadding="0" cellspacing="0">
            <tbody><tr>
                <td class="default" style="text-ali+"-"+n: right;">请选择银行:</td>
                <td><select class="inputstyle_bkf" name="areas" onchange=" areas_change(this.value);" id="areas">
        	  <option value="14">民生银行</option>
            <option value="17">兴业银行</option>
            <option selected="selected" value="19">工商银行</option>
            <option value="">其他</option>
        	</select></td>
            </tr>
            <tr>
                <td class="default" style="text-align: right;">手续费(万分之):</td>
                <td><input value="18" name="area" id="area" class="inputstyle_bk" type="text"><input value="14" name="people" id="people" class="txtnum" type="hidden"> <!--you want to have a test--><input value="17" name="job" readonly="readonly" id="job" class="txtnum" type="hidden"> <input value="18" name="commerce" id="commerce" class="txtnum" type="hidden"><input name="others" id="others" class="txtnum" type="hidden"></td>
            </tr>
            <tr>
                <td class="default" style="text-align: right;">交易品种:</td>
                <td><select name="trade" id="trade" class="inputstyle_bkf">
            <option  value="1000">AU T+D</option>
            <option selected="selected" value="1">AG T+D</option>
            </select></td>
            </tr>
            <tr>
                <td class="default" style="text-align: right;">多空单:</td>
                <td><select name="lists" id="lists" class="inputstyle_bkf">
            <option selected="selected" value="1">多单</option>
            <option value="-1">空单</option>
            </select></td>
            </tr>
            <tr>
                <td class="default" style="text-align: right;">持仓手数:</td>
                <td><input  value="1" name="grapnum" onkeypress="keyPress()" maxlength="10" id="grapnum" class="inputstyle_bk" type="text"></td>
            </tr>
            <tr>
                <td class="default" style="text-align: right;">开仓价格:</td>
                <td><input name="openprice"  value="5915" onkeypress="if((event.keyCode<48 || event.keyCode>57) &amp;&amp; event.keyCode!=46 || /\.\d\d$/.test(value))event.returnValue=false" maxlength="10" id="openprice" class="inputstyle_bk" type="text"></td>
            </tr>
            <tr>
                <td class="default" style="text-align: right;">平仓价格:</td>
                <td><input name="ordinaryprice" onkeypress="if((event.keyCode<48 || event.keyCode>57) &amp;&amp; event.keyCode!=46 || /\.\d\d$/.test(value))event.returnValue=false" maxlength="10" id="ordinaryprice" class="inputstyle_bk" type="text"></td>
            </tr>
            <tr>
                <td class="default" style="text-align: right;">盈亏:</td>
                <td><input name="show" maxlength="15" id="show" value="计算得出" class="inputstyle_bkh" type="text"></td>
            </tr>
            <tr>
                <td class="default" style="text-align: right;">公式:</td>
                <td>
                  <div id="exp" style="font-family: Arial, Helvetica, sans-serif;font-size: xx-small;"/></td>
            </tr>
            <tr>
                <td style="text-align: right;"><input class="button_8" value="计 算" onclick="javascript:cal()" type="button">&nbsp;&nbsp;</td>
                <td><input class="button_8_n" value="清 除" type="button" onclick="javascript:del()"></td>
            </tr>
        </tbody></table>
        </div>
    </div>
</div>
</div>
</div>
</div>


</div></div></body></html>


分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics