Commit c29f6f90 by BellCodeEditor

save project

parent e11aa9a3
Showing with 11 additions and 6 deletions
import tkinter import tkinter
def register(): def register():
print("dianjile")
name = e1.get()
print("yonghumingshi"+name)
password = e3.get() password = e3.get()
print("mimashi"+password)
password1 = e2.get() password1 = e2.get()
print("querenmimashi"+password1) name = e1.get()
filer = open(r"c:\Users\Windows 10\Documents\level3-lesson17-diy3\user.txt","w",encoding="utf-8")
filer.write(""+name)
filer.write(""+password1)
filer.close()
# 建立窗口对象 # 建立窗口对象
root = tkinter.Tk() root = tkinter.Tk()
root.title("注册") # 设置窗口标题 root.title("注册") # 设置窗口标题
...@@ -41,4 +43,5 @@ lab3.place(x=30,y=140) ...@@ -41,4 +43,5 @@ lab3.place(x=30,y=140)
button1 = tkinter.Button(root,text="提交",bg="lightgreen",width=15, button1 = tkinter.Button(root,text="提交",bg="lightgreen",width=15,
command=register) command=register)
button1.place(x=150,y=250) button1.place(x=150,y=250)
root.mainloop() root.mainloop()
3213133213213123
\ 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