关于如何使用eval函数使用标签文本 [英] regarding how to use label text using eval function
本文介绍了关于如何使用eval函数使用标签文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好,我已经使用javascript计时器功能进行在线考试,
实际上我将结果存储在一个标签上,包含了Label1。
我希望使用文本这个标签就是在下面添加我的huperlink的路径..
hello , i have use javascript timer function for my online exam,
actually i store the result in one label clalled Label1.
and i want to use the text of this label i.e as to add the path of my huperlink below..
else {
alert("Time Out!");
window.location ="result.aspx?score=" + eval(Label1.Text);
}
but i getting problm ..can you correct the above link so that i able to send the label text(result) to my result webapge where i want to show my result.....
推荐答案
不要使用
Whay not to use
document.GetElementById("Label1").value;
而不是
instead of
eval(Label1.Text);
?
在你的方式:
?
In your way:
window.location ="result.aspx?score=" +'<%# Eval(Label1.Text)%>';
这篇关于关于如何使用eval函数使用标签文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文