C#winform和百度API互动-----之JS读取中C#中的函数
例子1
线上JS
var getcpylocation =window.external.getlocation();
map.centerAndZoom(getcpylocation,12);
C#
public string getlocation()
{
return this.textBox4.Text;
}
例子2
marker1.addEventListener("click", function showWin(){
window.external.LoadNewForm1();
});
上WINFORM函数
LoadNewForm1()
{
//调用窗体或者一些赋值等等
}

浙公网安备 33010602011771号