使用javascript将值转换为表单
我正在使用基于xhtml的Wapka.mobi。我想把一个字符串从一个span转换成一个表单。这是我用过的使用javascript将值转换为表单,javascript,html,forms,Javascript,Html,Forms,我正在使用基于xhtml的Wapka.mobi。我想把一个字符串从一个span转换成一个表单。这是我用过的 if(':user-prvar-625:'=='') { } else { document.getElementsByName("location")[0].innerHTML='From :user-prvar-625:';} 在这下面我有 function checkin(){ stat=document.getElementsByName("blog_b
if(':user-prvar-625:'=='') {
} else {
document.getElementsByName("location")[0].innerHTML='From :user-prvar-625:';}
在这下面我有
function checkin(){
stat=document.getElementsByName("blog_body")
[0].value;loc=document.getElementsByName("loc")[0].value; if(':user-prvar-625:'=='') {}
else {
document.getElementsByName("blog_body")
[0].value=stat+'[checkin]'+loc+'[/checkin]';
}
}
stat和loc是跨度吗
使用
.innerHTML
而不是.value
请把你的代码放在小提琴里,和我们分享。