以下是我的代码:
function disablefields(){
var suresh=[<?php echo $cryo_1kl_18_orig_jan; ?>];
if (document.getElementById('checkboxA').checked == 1){
document.getElementById('cryo_1kl_18_rev_jan').disabled='';
document.getElementById('cryo_1kl_18_rev_jan').value='**i want pass the php value here**';
}
我想将php值传递给javascript ...
答案 0 :(得分:0)
function disablefields()
{
var suresh=[<?php //echo $cryo_1kl_18_orig_jan; ?>];
if (document.getElementById('checkboxA').checked == 1) {
document.getElementById('cryo_1kl_18_rev_jan').disabled='';
document.getElementById('cryo_1kl_18_rev_jan').value='<?=$your_value?>';
}
答案 1 :(得分:0)
document.getElementById('cryo_1kl_18_rev_jan').value='<?php echo $php_value;?>';