i デフォルトの Web ページに 1 つの div があります。div スタイルは none を表示します。そのとき、ページ読み込みイベントでステータス none を取得する必要がありますが、ドロップダウン選択に基づいて JavaScript 関数で div ステータスが変更されました。
aspx ページ
<div id="Div1" runat="server" clientidmode="Static" style="display: none;">
ページ読み込みイベント
string Display1 = "";
Display1 = Div1.Style["display"]; (working fine)( get the display1 value=none)
ボタンをクリックすると、C#コードでそのようなdivが表示されます
Div1.Style.Add("display", "");(now show the div it is correct)
ドロップダウン 変更された fire JavaScript 関数コード
document.getElementById('Div1').style.display = 'none'; (after change dropdown Hide the div after pageload i got Display1 value="")
JavaScript関数を変更した後、ページの読み込みでnoneステータスを取得しません