var name =${name}
var title = Ext.create("Ext.panel.Panel", {
height : 80,
html : '美容培训系统',
region : 'north',
split : true,
bbar : [{
iconCls : 'icon-user'
text : name
},'-',{
text : Ext.Date.format(new Date(),'Y年m月d日')
},'->',{
text : '退出',
iconCls : 'icon-logout'
}],
bodyStyle : 'backgroud-color:#99bbe8;line-height : 50px;padding-left:20px;font-size:22px;color:#000000;font-family:黑体;font-weight:bolder;' +
'background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgba(153,187, 232, 0.4) ), color-stop(50%, rgba(153, 187, 232, 1) ),color-stop(0%, rgba(153, 187, 232, 0.4) ) )'
});

解决方案 »

  1.   

    你代码不是放在js文件中可以直接用服务器端标签,java不知道怎么搞。。自己修改红色的部分var title = Ext.create("Ext.panel.Panel", {
    height : 80,
    html : '美容培训系统',
    region : 'north',
    split : true,
    bbar : [{
    iconCls : 'icon-user'
    text : '<%=request%>'
    }
      

  2.   

    在JS文件中,这样写var name =${name}语法就报错
      

  3.   

    在JS文件中,这样写var name =${name}和语法就报错
    var name =${name};这样也报错
      

  4.   

    很多方法可以实现的,你可以异步去后台拿到数据之后,然后在callback函数里面去画这个panel,这时候就可以把server返回给你的值给apply这个text上面去。
    楼上的'<%=request%>', ${name} 这些都应该是利用JSP的表达式里帮你代入的,看你具体要怎么时候,选择合适你的方法。
      

  5.   

    就是放在JS文件中的在你的js文件导入的前面放一个script执行服务器端代码<script >
    var text="<%=request....%>"
    </script>
    <script src="你的那个js文件“></script>var title = Ext.create("Ext.panel.Panel", {
    height : 80,
    html : '美容培训系统',
    region : 'north',
    split : true,
    bbar : [{
    iconCls : 'icon-user'
    text : text