0

I have the following code in my python script. How do I change the image of my button instead of the default ugly looking button?

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")
)

I was hoping to have an effect similar to this:

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

1 回答 1

0

html 选项允许您输入任何 html 标记。:)

form.Button("Query", type="submit", description="Query" html="<img src="hello.png"/)
于 2013-07-04T09:37:37.647 回答