更新时间:2022-05-14 07:45:50
也许是asp.net自动命名它变成你的chart_div1变成类似ctl00_ContentPlaceHolder1_chart_div1。如果你的目标ASP.NET 4.0你可以在页面指令,刚刚成立的ClientIDMode =静态这个设定。这将产生的ID正是因为你有他们在你的控制。
Perhaps it's asp.net auto naming which turns your "chart_div1" into something like "ctl00_ContentPlaceHolder1_chart_div1". If you're targeting ASP.NET 4.0 you can switch this off in page directive, just set ClientIDMode="Static". This will produce ID's exactly as you have them in your controls.