javascript 声明变量为代码块遇到的问题
如何将一下代码 不增删任何东西声明成一个可以调用的变量或者方法
<form name="ask_zhuiwen_form" method="POST" enctype="multipart/form-data" action="/e/DoInfo/ecms.php">
<input type=hidden value=MAddInfo name=enews> <input type=hidden value=2 name=classid>
<input type="hidden" value="9" name="ecmsfrom">
<input name=id type=hidden id="id" value=> <input type=hidden value="1387683310" name=filepass>
<input name=mid type=hidden id="mid" value=10>
标题 :<input name="title" type="text" size="42" value="回复问题ID1">
<br>
<br>
关联 ID:
<input name="glid" type="text" id="glid" value="1" size="">
<br>
<br>
回复内容:<textarea name="content" cols="60" rows="10" id="content"></textarea>
<br>
<br>
<input type="submit" name="addnews" value="提交">
</form>
[解决办法]
<div id="aaa"><!--
<form name="ask_zhuiwen_form" method="POST" enctype="multipart/form-data" action="/e/DoInfo/ecms.php">
<input type=hidden value=MAddInfo name=enews> <input type=hidden value=2 name=classid>
<input type="hidden" value="9" name="ecmsfrom">
<input name=id type=hidden id="id" value=> <input type=hidden value="1387683310" name=filepass>
<input name=mid type=hidden id="mid" value=10>
标题 :<input name="title" type="text" size="42" value="回复问题ID1">
<br>
<br>
关联 ID:
<input name="glid" type="text" id="glid" value="1" size="">
<br>
<br>
回复内容:<textarea name="content" cols="60" rows="10" id="content"></textarea>
<br>
<br>
<input type="submit" name="addnews" value="提交">
</form>
--></div>
<script type="text/javascript">
var str = document.getElementById("aaa").innerHTML.slice(4,-3);
alert(str);
</script>