js加载函数不执行,html不加载

haoztao haoztao 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区

String describ = knowledgeBaseInfo.getDescrib();



function init()
{

var flag = "<%=addFlag%>";
if (flag == "true")
{
alert("操作成功!");
window.close();
}
else if (flag == "false")
{
alert("操作失败!");
window.close();
}
loadDate();
}

function loadDate()
{

if ('null' != '<%=seqId%>')
document.getElementById("seqId").value = '<%=seqId%>';
if ('null' != '<%=categoryid%>')
document.getElementById("categoryid").value = '<%=categoryid%>';
if ('null' != '<%=status%>')
document.getElementById("status").value = '<%=status%>';
if ('null' != '<%=categoryname%>')
document.getElementById("categoryname").value = '<%=categoryname%>';
if ('null' != '<%=type%>')
document.getElementById("type").value = '<%=type%>';
if ('null' != '<%=updatetime%>')
document.getElementById("updatetime").value = '<%=updatetime%>';
if ('null' != '<%=author%>')
document.getElementById("author").value = '<%=author%>';
if ('null' != '<%=updater%>')
document.getElementById("updater").value = '<%=updater%>';
if ('null' != '<%=keyword%>')
document.getElementById("knowledgeId").value = '<%=keyword%>';
if ('null' != '<%=summary%>')
document.getElementById("summary").innerText = '<%=summary%>';
if ('null' != '<%=describ%>')
document.getElementById("describ").innerText ='<%=describ%>';
}

<body style="MARGIN: 0px" bgColor="#F7F9FF" onload="init()" class="insideFrame_body">
有如下问题:如果java获取到的值describ 比较长的话下面的js函数不执行,如果我删除

if ('null' != '<%=describ%>')
document.getElementById("describ").innerText ='<%=describ%>';

就没有问题,请各位指导。
...全文
评论 12
收藏 已收藏
分享
返回顶部
haoztao
Web 开发 81,108 成员 341,721 内容