cancel

種類メソッド
書式 コマンドオブジェクト.cancel()
解説
コマンドの実行をキャンセルします。(下記サンプルは適当なものなので参考にしないでください)
サンプルコード
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>Sample</title>
<style type="text/css"><!--
body { margin:0px; }
form { position:absolute; top:10;left:10px; }
--></style>
<script type="text/javascript"><!--
LF = String.fromCharCode(10);
window.onload = function()
{
cmdObj = widget.system("/usr/bin/bc",endFunc);
cmdObj.onreadoutput = display;
}
function display(stdString)
{
document.getElementById("txtField").value = stdString;
}
function endFunc()
{
}
function calc()
{
cmdObj.write("1+2+3+4*5"+LF);
}
function endCalc()
{
cmdObj.cancel();
}
// --></script>
</head>
<body>
<img src="Default.png">
<form>
<textarea id="txtField" rows="5" cols="32"></textarea><br>
<input type="button" value="calc" onClick="calc()">
<input type="button" value="cancel" onClick="cancelCalc()">
</form>
</body>
</html>
実際のスクリプトをダウンロード