每当我运行这个类(包括适用的代码部分)时:
$( ".selector" ).on( "pagecontainerbeforeshow", function( event, ui ) {
alert(ui.toPage.prop("id"));
} );
通过驱动程序类的这一部分。
def setLevel(self, level):
if (self.__level == "Freshman" or self.__level == "Sophomore" or self.__level == "Junior" or self.__level == "Senior"):
self.__level = level
else:
raise ValueError("Level must be Freshman, Sophomore, Junior, or Senior")
我被允许使用if语句中未包含的字符串。如果我需要发布代码的任何部分,我可以。
编辑:
undergraduate = Undergraduate("Jonathan", "Zhang", "214-000-0000", Address("611 Leon", "Austin", "Texas", 78705), "234-56-7890", "student@utexas.edu", 2300106, "Management Information Systems", 3.95, "Loser")