以下是我的 HTML 代码
<div id="dl_address" class="dl-row">
<div class="dl-col1">
<span id="dl_addressMarker" class="dl-Marker">*</span>Address:
</div>
<div class="dl-col2">
<input id="dl_addressMarker" name="p.streetAddress" maxlength="100" size="15"
class="landing-qualpanel-input-standin" type="text" onClick="formOpt(id)" value="Home Address">
</div>
</div>
以下是我的javascript代码
<script language="javascript" type="text/javascript">
function formOpt(x){
var y=document.getElementById(x).value;
alert(y);
}
</script>
我不明白为什么我会变得未定义。请帮助。提前致谢