SOURCE

console 命令行工具 X clear

                    
>
console
				function jis(){
					var a=parseInt(document.getElementById("a").value);
					var b=parseInt(document.getElementById("b").value);
					var sel =document.getElementById("select").value;

					var  result='';
					
					switch(sel)
					{	
						case '+': result= a+b ;break;
						case '-': result= a-b ;break;
					}
					document.getElementById("d").value=result;
				}
	<body>
    <div class="top" style="height:70px;border-bottom:1px solid #ddd;">
<img class="logoIndex" height="60" src="https://www.zenitour.com/img/logoIndex.png" style="margin-left:10px;margin-top:5px;">
</div>
    <div class="content" style="text-align:center;margin-top:50px;height: 78%;">
		<p>简单的加减法工具</p>
		<input id="a" type="text" class="sty"/>
			<select id="select">
				<option >+</option>
				<option	>-</option>
			</select>
		<input id="b" type="text" class="sty"/>
		<button type="button" onclick="jis()">=</button>
		<input id="d" type="text" class="sty" />
    </div>
    <div id="bottom" style="text-align:center;border-top:1px solid #ddd;">
<span class="centerspan" style="font-size:10px">Copyright © 2017 Zenitour lnc All Rights Reserved 版权所有-哲途教育  渝ICP备13002955号-2</span>
	</body>
        html,body {
            width: 100%;
            height: 100%;
            margin: 0;
            padding: 0;
        }