2013-06-20 55 views
0

我在我的python脚本中有以下代码。如何更改我的按钮图像而不是默认的难看的按钮?更改web.py中的按钮图像

import web 
from web import form 

render = web.template.render('templates/') 

urls = ('/','index') 

register_form = form.Form(
    form.Textbox("name",size=40, description="Please enter name: "), 
    form.Button("Query", type="submit", description="Query") 
) 

我希望有类似这样的效果:

< button>< img src="index.png">< /img>< /button> 

回答

0

HTML选项允许你输入任何HTML标记。 :)

form.Button("Query", type="submit", description="Query" html="<img src="hello.png"/)