日期:2014-05-17  浏览次数:20714 次

jsp数据显示
HTML code

<%@ page contentType="text/html; charset=utf-8" language="java"
    pageEncoding="utf-8" import="java.sql.*" errorPage=""%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ taglib prefix="s" uri="/struts-tags"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>房产详细</title>
<script type="text/javascript" src="../js/jquery-1.7.1.js"></script>
<script language="javascript">
    var a = 1;
    //投票
    function fun_vote() {

        if (0 === a) {
            alert("您已投过票了!")

            //$.get(url,null,back());
        } else if (a = 1) {
            $('#vote').html(parseInt($('#vote').html()) + 1)
            var ret = $('#einame').html();
            var url = "Vote!vote?estateInfoName=" + ret;
            $.get(url, null);
            a = 0;
        }
    }
</script>
</head>

<body>
    <s:iterator value="#session.detailed" status="status">
        <table>
            <tr>
                <td align="center" colspan="2"><h1>房产详细页面</h1></td>
            </tr>
            <tr>
                <td>房产名称</td>
                <td><div id="einame">
                        <s:property value="estateInfoName" />
                    </div></td>
            </tr>
            <tr>
                <td>房产类型</td>
                <td><s:property value="estateInfoType" /></td>
            </tr>
            <tr>
                <td>房产面积</td>
                <td><s:property value="estateInfoArea" /></td>
            </tr>
            <tr>
                <td>房产价格</td>
                <td><s:property value="estateInfoPrice" /></td>
            </tr>
            <tr>
                <td>开盘时间</td>
                <td><s:property value="estateInfoTime" /></td>
            </tr>
            <tr>
                <td>投票量</td>
                <td>
                    <div id="vote">
                        <s:property value="estateVote" />
                    </div>
                </td>
            </tr>
            <tr>
                <td colspan="2" align="right"><input type="button" id="sss"
                    onclick="fun_vote()" value="投票" /></td>
            </tr>
        </table>
    </s:iterator>
</body>
</html>



为什么我这个页面在IE下面没有数据显示,在火狐和谷歌浏览器上好好的

------解决方案--------------------
<s:property value="#b.title" /> 少了#
------解决方案--------------------
<s:iterator value="boards" var="b">
<tr id="<s:property value="#b.id" />" >
------解决方案--------------------

} else if (a = 1) {

这里判断不对吧?
------解决方案--------------------
判断浏览器的兼容性:
function creatXmlHttp() {
if (window.ActiveXObject) {//支持IE浏览器
xmlHttp