xinyb
2024-07-01 41485264ec9de48ffde1e506b897962e20c8440e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<%@ 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>