这个是.net(csharp)怎么实现?

来源:百度知道 编辑:UC知道 时间:2024/06/26 04:30:17
http://news.sina.com.cn/world/

排行榜,同一个层,点击不同的事件,显示不同的内容,这个是怎么弄的??

用c#怎么写?

他那个啊.是用框架做的.然后有四个imagebutton.分别写四个事件不就OK了么.

建议你用div做吧.就那么点儿新闻.在页面加载的时候全加载进来.然后各个div.默认隐藏.只留其中一个显示.然后在另外的四个button上面(div).onclick事件写指定的div.让它显示.

这个我做过,假设显示两种,就在该层里放2个表格,点击相应的就隐藏或显示相应的表格,用脚本写的,非常简单,我把我的脚本贴出来,不明白就问我
function replychange(id)
{
document.getElementById("title1").style.backgroundImage="url(image/profiledr02.gif)";
document.getElementById("title2").style.backgroundImage="url(image/profiledr02.gif)";
document.getElementById("title"+id).style.backgroundImage="url(image/profiledr01.gif)";
document.getElementById("title1").style.color="black";
document.getElementById("title2").style.color="black";
document.getElementById("title"+id).style.color="white";

//document.getElementById("replay1").style.display="none";

//document.getElement