嗨,这是我显示警报框的代码:

    var answer = window.confirm ("The registration you have entered is illegal for the uk roads. By clicking ok you are accepting full resposibility for this plate and agreeing to use it for offroad use only.");

    if (answer) {
    //Tell them its a show plate
    $('#numberplateyellow').append(platetext);
    $('#numberplatewhite').append(platetext);
    $('#illegal').append('Show Plate Not Road Legal');
    }else{
    $('#illegal').empty();
    }

  }else{
     //Its A Legal Plate
    $('#numberplateyellow').append(platetext);
    $('#numberplatewhite').append(platetext);
  }


我希望windows.confirm包含一个复选框,如果您同意条款和条件,请在此处选中。

我如何在window.confirm中添加一个复选框?

谢谢

最佳答案

您无法添加复选框进行确认。您必须创建自己的对话框才能起作用。



这是使用jQuery对话框的小提琴演示:http://jsfiddle.net/maniator/tRBEt/

07-24 09:51
查看更多