如何将HTML / php变量传递给JavaScript
问题描述:
我希望表单能够根据HTML / php变量的逻辑自动选择单选按钮。示例如下所示:
javascript :
I wish to have the form to be able to automatically select the radio button based on the logic of HTML/php variable. example show below:
javascript:
展开 | / span> 选择 | 换行 | 行号
答
嗨...
欢迎来到TSDN ...
你必须使用当你确定
hi ...
welcome to TSDN ...
you have to use single quotes inside the onload, or no quotes when you are sure that
值始终是一个数字并且
值必须打印到html页面时,onload中的单引号或没有引号(必须在发送给客户端之前进行处理):
value must be printed to the html page (that has to be processed before sent to the client):
展开 | 选择 | 换行 | 行号