我想从javascript更改面板宽度大小。 这是我的代码,但不起作用:
Javascript代码:
<script type="text/javascript">
var ExtraExpandMAP = function (pannello) {
pannello.setWidth = 920;
};
</script>
Asp.Net代码:
<ext:Panel ID="PanelLazyMAP" runat="server"
Region="East"
Width="460"
Title="Mappa"
Layout="Fit"
Floatable="false"
Resizable="true"
Collapsed="true"
Collapsible="true"
AutoScroll="false"
BodyStyle="background-color:#ffffff;"
MarginSpec="84 0 0 0" AnimCollapse ="false">
<HeaderConfig>
<Items>
<ext:Button ID="btnExpandExtraMAP" runat="server" Icon="RewindGreen">
<Listeners>
<Click Handler="ExtraExpandMAP(#{PanelLazyMAP});">
</Click>
</Listeners>
</ext:Button>
</Items>
</HeaderConfig>
</ext:Panel>
答案 0 :(得分:0)
问题是:
pannello.setWidth = 920;
而不是:
pannello.setWidth(920);