TypeError:在没有实现接口HTMLElement的对象上调用'click' [英] TypeError: 'click' called on an object that does not implement interface HTMLElement
本文介绍了TypeError:在没有实现接口HTMLElement的对象上调用'click'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一些javascript将数据发送到调用php页面的函数,但是我收到一个错误,我无法找到任何信息。 postData()调用位于另一个普通javascript函数的中间。但我无法让它将数据提交到php页面。
I have some javascript that sends data to a function that calls a php page, however I get an error that I can't find any information on. The postData() call is in the middle of another plain javascript function. But I can't get it to submit the data to the php page.
function postData() {
var postdataURL = "path/to/php/page.php";
$.post (
postdataURL, {
"formid":5,
"clientid":1,
"userid":1,
"level":mycat,
"extra":mytimer,
"pid":pid
},
function () {});
}
推荐答案
从名称中删除属性
$.post (
postdataURL, {
formid:5,
clientid:1,
userid:1,
level:mycat,
extra:mytimer,
pid:pid
},
function () {});
并添加
alert("Got called");
function postData() {
确保函数被调用
这篇关于TypeError:在没有实现接口HTMLElement的对象上调用'click'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文