我在 JS 中做了什么:
<script type="text/javascript">
function displayThesis(){
var thesisForm = document.getElementById("thesisForm").innerHTML;
document.getElementById("activeForm").innerHTML = thesisForm;
}
function displayNonThesis(){
var nonThesisForm = document.getElementById("nonThesisForm").innerHTML;
document.getElementById("activeForm").innerHTML = nonThesisForm;
}
</script>
然后我会做一些事情,比如:
<form action="" method="get">
<p>Do you need the thesis option form?</p>
<label>Yes</label>
<input name="thesisOption" type="radio" value="Yes" onclick="displayThesis()" />
<label>No</label>
<input name="thesisOption" type="radio" onclick="displayNonThesis()" />
</form>
调用这些函数。
我将如何使用列出并调用的外部飞镖程序执行此操作:
<script type="application/dart" src="attempt1.dart"></script>