Commit 877c0d6f by BellCodeEditor

save project

parent 9c1183e1
Showing with 26 additions and 7 deletions
usersname = input("请输入用户名:") import tkinter as tk
password = input("请输入密码:") var = tk.StringVar()
if(usersname == "ak47" and password == 'dnfh'): def btn():
print("登录成功!") global var
else: global en_user
print("dnfh傻逼滚!") global en_pass
\ No newline at end of file usersname = en_user.get()
password = en_pass.get()
if usersname == "ak47" and password == 'dnfh':
var.set("登录成功!")
else:
var.set("dnfh傻逼滚!")
root = tk.Tk()
root.geometry("200x150")
root.title("登录")
en_user = tk.Entry(root)
en_pass = tk.Entry(root)
la = tk.Label(root,width = 200, height = 30 ,bgcolor = 'blue',textvariable = var)
# usersname = input("请输入用户名:")
# password = input("请输入密码:")
bt = tk.Button(root, width = 10,height = 2,text = '确认',command = btn)
la.pack()
en_user.pack()
en_pass.pack()
root.mainloop()
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment