4月 23, 2009

刪除確認??


if(!confirm('是否確定要刪除?')){return false;}"


在OnClientClick中加入
or

return confirm('確認要刪除嗎?');

or

<script language="javascript" type="text/javascript">
 function ConfirmDeletion() {
  if (event.srcElement.value == "刪除" )
  event.returnValue = confirm("確定要刪除嗎?");
 } document.onclick = ConfirmDeletion;
</script>

4月 11, 2009

動態下拉式選單


If ddl_Stu1_Sex.SelectedValue = "女" Then
            ddl_Stu2_Sex.Items.Clear()
            ddl_Stu3_Sex.Items.Clear()
            ddl_Stu4_Sex.Items.Clear()
            ddl_Stu2_Sex.Items.Add("女")
            ddl_Stu3_Sex.Items.Add("女")
            ddl_Stu4_Sex.Items.Add("女")


        Else
            ddl_Stu2_Sex.Items.Clear()
            ddl_Stu3_Sex.Items.Clear()
            ddl_Stu4_Sex.Items.Clear()
            ddl_Stu2_Sex.Items.Add("男")
            ddl_Stu3_Sex.Items.Add("男")
            ddl_Stu4_Sex.Items.Add("男")
            ddl_Floor.Parent.DataBind()



        End If