将变量写入页面 [英] writing a variable to a page

查看:63
本文介绍了将变量写入页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我有以下代码,如果我希望总数在表单字段中,但我想使用document.write将数量写入网页,它可以正常工作,已尝试各种但不能让它工作

展开 | 选择 | Wrap | 行号

解决方案

don?使用 document.write(),使用 .appendChild() .innerHTML (?)。


< blockquote>嗨


感谢您的建议,我对javascript并不是那么好,用asp更好,但不会有帮助,任何人都可以帮助一些代码或指向某个地方阅读它,谢谢


如果有人知道,你做什么,肯定有一些帮助可能。 (该功能没有解释太多)


Hi

I have the following code and it works fine if i want the total to be in a form field but i want to write the amount to the webpage using document.write, have tried all sorts but cant get it to work

Expand|Select|Wrap|Line Numbers

解决方案

don?t use document.write(), use .appendChild() or .innerHTML (?).


Hi

Thanks for the advice, i am not really that good with javascript, better with asp but that wont help, can anyone either help with some code or point me to somewhere to read about it, thanks


if anyone would know, what you?re up to, there sure is some help possible. (the function does not explain much)


这篇关于将变量写入页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆