2012-11-29 50 views
0

我在python中有一個CGI表單,並且我想在這個表單中引入一個工具提示 ,其中包含有關當這個 字段集中時必須寫入字段的值的指示。在CGI python中引入工具提示

我的格式如下:

print '<form name="input" action="operation.py" method="get">' 
print '<input type="submit" value="Submit">' 
print '<table>' 
print '<tr><td>%s</td><td><input type="text" name=%s size="100" value=%s></td></tr>' %('test','test', 'test') 
print '<tr><td>&nbsp</td><td></td></tr>' 
print '</table>' 

print '<input type="submit" value="Submit"></form>' 
print '</body></html>' 

憑什麼介紹了現場測試的工具提示?

謝謝 伊斯梅爾

+0

你有沒有考慮使用HTML5 ['placehoder'(http://dev.w3.org/html5/spec/common-input-element-attributes.html#the-placeholder-attribute)屬性? –

回答

0

使用title屬性作爲解釋here

<td title="Use this for something"> 
+0

我喜歡使用HTML4標題屬性,如下所示,謝謝你的回答。 – Ismail