php程序调用javascript自定义函数解决方法

WBOY
Release: 2016-06-13 13:41:15
Original
995 people have browsed it

php程序调用javascript自定义函数


if($result!=false)
怎样调用setText()?????
?>

------解决方案--------------------
你可以先检测一下函数是否被调用到。能不能弹窗。
function setText(){
alert(true);return;
 form1.xz.disabled=true;
 form1.xg.disabled=false;
 form1.sc.disabled=false;
}
function setText1(){
alert(false);return;
 form1.xz.disabled=false;
}
------解决方案--------------------
恩。alert()有动作说明调用没问题。注释掉试试。
------解决方案--------------------
方法名写错了!

document.getElementById
不是
document.getElementsById

document.getElementById 方法返回的是单值数据,所以没有那个 s
DHML 的命名规则还是有点意思的吧?


无论是否是在调试,alert("123");return; 中的 return都是不需要的。都 return 了,后面的语句还会执行吗?

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!