2012-11-29 51 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