Commit 670f26ad by BellCodeEditor

save project

parent 9d49dd7d
Showing with 17 additions and 1 deletions
import tkinter import tkinter
def register():
a1=a.get()
b1=b.get()
c1=c.get()
if b1==c1:
print("用户提交成功")
f=open(r"C:\Users\Windows 10\Desktop\user.txt","w",encoding="utf-8")
f.write(a1)
f.write(":")
f.write(c1)
f.close()
else:
print("提交失败")
root=tkinter.Tk() root=tkinter.Tk()
root.title("注册") root.title("注册")
root.geometry("400x320+600+200") root.geometry("400x320+600+200")
...@@ -20,4 +32,7 @@ lab.place(x=50,y=140) ...@@ -20,4 +32,7 @@ lab.place(x=50,y=140)
lab=tkinter.Label(root,text="确认密码:",font=("宋体",15),fg="black") lab=tkinter.Label(root,text="确认密码:",font=("宋体",15),fg="black")
lab.place(x=30,y=200) lab.place(x=30,y=200)
an=tkinter.Button(root,text="提交",bg="lightgreen",width=15,command=register)
an.place(x=150,y=250)
root.mainloop() 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