如何通过单击按钮将值分配给timingfield()输入
例如: html
class ReadTaskHandler implements Runnable {
SelectionKey key;
public ReadTaskHandler(SelectionKey key) {
this.key = key;
}
@Override
public void run() {
ByteBuffer buffer = ByteBuffer.allocate(1024);
SocketChannel channel = (SocketChannel) key.channel();
int size = 0;
try {
while ((size = channel.read(buffer)) > 0) {
System.out.println(new String(buffer.array()));
buffer.flip();
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
js代码
jQuery('#changetime')。on('click',function(){
jQuery('#runtime')。val('5678'); jQuery(“。timing”)。timingfield(); });