1、javafx直接执行html中的js脚本
2、把java中的对象注入到html中,在html网页中调用java端的代码,执行javafx中的方法。 代码:
package com.application;
import com.controller.system.IndexController;
import com.jfoenix.controls.JFXDecorator;
import io.datafx.controller.flow.Flow;
import io.datafx.controller.flow.container.DefaultFlowContainer;
import io.datafx.controller.flow.context.FXMLViewFlowContext;
import io.datafx.controller.flow.context.ViewFlowContext;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.stage.Stage;
public class IndexApp extends Application {
@FXMLViewFlowContext
private ViewFlowContext flowContext;
@Override
public void start(Stage stage) throws Exception {
// TODO Auto-generated method stub
try {
Flow flow = new Flow(Ind