如何从代码后面的参数发送到javascript代码? [英] how to send a parameter from code behind to javascript code?
本文介绍了如何从代码后面的参数发送到javascript代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
$(function () {
$('#container').highcharts({
chart: {
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false
},
title: {
text: 'Browser market shares at a specific website, 2014'
},
tooltip: {
pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: true,
format: '<b>{point.name}</b>: {point.percentage:.1f} %',
style: {
color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
}
}
}
},
series: [{
type: 'pie',
name: 'Browser share',
data: [
['Firefox', 45.0 how to send these parameters from code behind],
['IE', 26.8 how to send these parameters from code behind],
{
name: 'Chrome',
y: 12.8 how to send these parameters from code behind,
sliced: true,
selected: true
},
['Safari', 8.5 how to send these parameters from code behind],
['Opera', 6.2 how to send these parameters from code behind],
['Others', 0.7 how to send these parameters from code behind]
]
}]
});
});
Firefox,45.0如何从代码中发送这些参数
Firefox,45.0 how to send these parameters from code behind
推荐答案
(function(){
(function () {
(' #container') .highcharts({
chart:{
plotBackgroundColor: null ,
plotBorderWidth: null ,
plotShadow: false
},
title:{
text:' 特定网站上的浏览器市场份额,2014'
},
工具提示:{
pointFormat:' {series.name}:< b> {point.percentage:.1f}%< / b>'
},
plotOptions:{
pie:{
allowPointSelect: true ,
cursor:' pointer',
dataLabels:{
enabled: true ,
格式:' < b> {point.name}< / b>:{point.percentage:.1f}%',
样式: {
color:(Highcharts.theme&& Highcharts.theme.contrastTextColor)|| ' black'
}
}
}
},
系列:[{
类型:' pie',
name:' 浏览器共享',
数据:[
[< span class =code-string>' Firefox', 45 。 0 如何从代码后面发送这些参数,
[' IE', 26 。 8 如何从代码后面发送这些参数,
{
name:' Chrome',
y: 12 。 8 如何从代码中发送这些参数,
切片: true ,
选择: true
},
[' < span class =code-string> Safari', 8 。 5 如何发送这些参数来自代码隐藏],
[' Opera', 6 。 2 如何发送这些参数来自代码背后],
[' 其他', 0 。 7 如何发送这些参数 from 代码隐藏]
]
}]
});
});
('#container').highcharts({ chart: { plotBackgroundColor: null, plotBorderWidth: null, plotShadow: false }, title: { text: 'Browser market shares at a specific website, 2014' }, tooltip: { pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>' }, plotOptions: { pie: { allowPointSelect: true, cursor: 'pointer', dataLabels: { enabled: true, format: '<b>{point.name}</b>: {point.percentage:.1f} %', style: { color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black' } } } }, series: [{ type: 'pie', name: 'Browser share', data: [ ['Firefox', 45.0 how to send these parameters from code behind], ['IE', 26.8 how to send these parameters from code behind], { name: 'Chrome', y: 12.8 how to send these parameters from code behind, sliced: true, selected: true }, ['Safari', 8.5 how to send these parameters from code behind], ['Opera', 6.2 how to send these parameters from code behind], ['Others', 0.7 how to send these parameters from code behind] ] }] }); });
Firefox,45.0如何从后面的代码发送这些参数
Firefox,45.0 how to send these parameters from code behind
试试这个:
Page.ClientScript.RegisterStartupScript(typeof(Page), "myscript", sscript.ToString(), true);
这篇关于如何从代码后面的参数发送到javascript代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文