2013-06-20 57 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"/)