Webアプリケーション(ASP.NET2.0 C#)があります。その中に、チェックボックスリストとボタンを含むdivがあります。
divの表示を切り替えたいので、JavaScriptコードをオンラインで入手しました。
コードは次のとおりです。
<script language="javascript">
var state = 'hidden';
function showhide(layer_ref) {
if (state == 'visible')
{
state = 'hidden';
}
else
{
state = 'visible';
}
if (document.all)
{ //IS IE 4 or 5 (or 6 beta)
eval( "document.all." + layer_ref + ".style.visibility = state");
}
if (document.layers)
{ //IS NETSCAPE 4 or below
document.layers[layer_ref].visibility = state;
}
if (document.getElementById && !document.all)
{
maxwell_smart = document.getElementById(layer_ref);
maxwell_smart.style.visibility = state;
}
}
</script>
この関数を次のように呼び出します。
<a href="javascript://" onclick="showhide('AlertDiv');">Choose Columns</a>
この関数を使用すると、ボタン付きのdivが表示されますが、チェックボックスリストが表示されません。...何が起こっているのかについて何かアイデアはありますか?
ありがとうございました。