Closed RobotWuYun closed 3 years ago
func uiToBack(root *sciter.Element) {
button1, _ := root.SelectById("add")
button1.DefineMethod("test1", func(args ...*sciter.Value) *sciter.Value {
for _, arg := range args {
fmt.Println("获取到前端的参数:", arg)
}
return sciter.NullValue()
})
}
<script type="text/tiscript">
$(#add).on("click", function() {
this.test1("参数1", "参数2", "参数3");
});
</script>
@jqqjj Thanks very much.
when I wang use
func(args ...*sciter.Value) *sciter.Value{}
to get data , add make it to a button,the window will close and say "Unhandled sciter event case: 32768",why?