<input type="radio"...>X<br> , X的显示与+X+的显示

python中:

print('<input type="radio" name=a value=b>'X'<br>')    html中直接显示X,<br>为换行

print('<input type="radio" name=a value=b>'+X+'<br>') 则X为变量值,html中显示变量值

要想显示变量的值,而不是固定值,就得+变量名,如果有换行<br>,需要+变量名+。

不管需要将该值在页面上显示,还是赋值给某元素的value属性。

 

print('athelet:‘+athsdata[athletedata].name)后面的参数可以不加引号

posted @ 2017-10-13 14:01  从0开始_我愿意  阅读(344)  评论(0编辑  收藏  举报