<%@ page contentType="text/html;charset=utf-8"%>
|
<!DOCTYPE HTML >
|
<head>
|
<title>中缀式表达式(即数学表达式)</title>
|
<meta http-equiv="pragma" content="no-cache">
|
<meta http-equiv="cache-control" content="no-cache">
|
<meta http-equiv="expires" content="0">
|
<link rel="stylesheet" type="text/css" href="/style/icon.css?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/style/icon.css")%>">
|
<link rel="stylesheet" type="text/css" href="/style/default/easyui.css?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/style/default/easyui.css")%>">
|
<script type="text/javascript" src="/js/jquery-1.4.4.min.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/jquery-1.4.4.min.js")%>"></script>
|
<script>
|
function copyText(){
|
|
$.ajax({
|
|
type:'post',
|
dataType: 'text',
|
url:'/rpn.do?m=a',
|
|
data:{'rpn':$("#rpn").val()},
|
success:function(data){
|
|
$("#rpn2").attr("value",data);
|
$("#rpn2").select();
|
|
},
|
|
error:function(data){
|
|
//请求出错处理
|
alert(data);
|
}
|
|
});
|
}
|
</script>
|
</head>
|
<body style="text-align:center;">
|
<div style="margin:0 auto;" >
|
<div style="margin:0 auto;">
|
数学表达式:
|
<input type="text" id="rpn" value="" size="80"/>
|
</div>
|
<div style="margin:0 auto; padding:20px;">
|
<button onclick="copyText()">转换</button>
|
</div>
|
<div style="margin:0 auto;">
|
逆波兰式 :<input type="text" id="rpn2" value="" size="80" readonly="true"/>
|
</div>
|
|
</div>
|
|
|
</body>
|
</html>
|