Commit dd6b9b00 by BellCodeEditor

save project

parent 4cb1b6eb
Showing with 10 additions and 0 deletions
import tkinter
def register():
n = e1.get()
k = e2.get()
k_ = e3.get()
print("a","n",n,"k",k,"k_",k_,)
with open('.\\user.txt','w',encoding='utf-8') as f:
f.write(f'{n},{k}')
# 建立窗口对象
root = tkinter.Tk()
root.title("注册") # 设置窗口标题
......@@ -26,5 +33,8 @@ key = tkinter.Label(root,text="密 码",font=("宋体",14),fg="red",width=13)
key.place(x=0,y=140)
key_ = tkinter.Label(root,text="确认密码",font=("宋体",14),fg="red",width=13)
key_.place(x=0,y=200)
a = tkinter.Button(root,text="提交",bg="lightgreen",width=15,command=register)
a.place(x=150,y=250)
# 保持窗口监听,进入消息循环
root.mainloop()
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