怎么调用 还是根本不行????????????????????
html:
function show_menu(id_len,id,Teaching_templet_Grade_id,sql,member_id)
{
code=id;
eval( "document.all.plus " + code + ".style.display= 'none ' ");
eval( "document.all.minus " + code + ".style.display= ' ' ");
eval( "document.all.row "+code+ ".style.display= ' ' ");
}
cs:
public asdasd()
{
调用show_menu(id_len,id,Teaching_templet_Grade_id,sql,member_id)
}
怎么调用 还是根本不行
------解决方案--------------------在html页面底下写个 <asp:label
在cs里label.text = " <script> show_..... </script> ";
汗一个
------解决方案--------------------晕,貌似你是服务器端调用客户端方法吧?
------解决方案--------------------public asdasd()
{
Response.Write( " <script >
调用show_menu(id_len,id,Teaching_templet_Grade_id,sql,member_id);
</script> }
------解决方案--------------------up
------解决方案--------------------CS中:
Response.Write( " <script language= 'javascript '> show_menu(id_len,id,Teaching_templet_Grade_id,sql,member_id) </script> ");
------解决方案--------------------up
也可以写在空间的atribute上
page_load()时候
------解决方案-------------------- public asdasd()
{
Response.Write( " <script >
调用show_menu(id_len,id,Teaching_templet_Grade_id,sql,member_id);
</script> }
------解决方案--------------------try ->
public asdasd()
{
Response.Write(String.Format( " <script> window.onload = function() { show_menu({{0}}, {{1}}, {{2}}, {{3}}, {{4}}); } </script> ", id_len, id, Teaching_templet_Grade_id, sql, member_id));
}
------解决方案--------------------ClientScript.RegisterStartupScript(GetType(), "Expand ", " <SCRIPT LANGUAGE= 'javascript '> show_menu(id_len,id,Teaching_templet_Grade_id,sql,member_id) </script> ");
------解决方案--------------------Response.Write(String.Format( " <script> window.onload = function() { show_menu( '{{0}} ', '{{1}} ', '{{2}} ', '{{3}} ', '{{4}} '); } </script> ", id_len, id, Teaching_templet_Grade_id, sql, member_id));