为什么Javascript文本编辑器WidgEditor不提交任何值?
当我单击submit并尝试从为什么Javascript文本编辑器WidgEditor不提交任何值?,javascript,html,textarea,text-editor,Javascript,Html,Textarea,Text Editor,当我单击submit并尝试从文本区域获取文本时,我将变为空白。我不知道为什么 函数textSubmit(){ var text=$(“#噪声”).val(); console.log(文本); console.log(“此处”); var htmlText=$(文本); console.log(htmlText); } 您的代码中缺少.text()。看一看: 函数textSubmit(){ var text=$(“#噪声”).val(); console.log(文本); consol
文本区域
获取文本时,我将变为空白。我不知道为什么
函数textSubmit(){
var text=$(“#噪声”).val();
console.log(文本);
console.log(“此处”);
var htmlText=$(文本);
console.log(htmlText);
}
您的代码中缺少.text()
。看一看:
函数textSubmit(){
var text=$(“#噪声”).val();
console.log(文本);
console.log(“此处”);
var htmlText=$(text).text();
console.log(htmlText);
}
sajdhas
您的代码中缺少.text()
。看一看:
函数textSubmit(){
var text=$(“#噪声”).val();
console.log(文本);
console.log(“此处”);
var htmlText=$(text).text();
console.log(htmlText);
}
sajdhas
即使在使用此库时,也请尝试在代码中包含.text()
。如果它不起作用,我将删除我的答案。即使在使用此库时,请尝试在代码中包含.text()
。如果它不起作用,我将删除我的答案。