var num=1
function AddInput()
{
var str=""
str+="<input type=\"text\" id=\""+num+"\">"
window.dvInput.innerHTML+=str
num++
}
<div id="dvInput">
</div>
ActionLink - 链接到 *** 作方法。BeginForm * - 标记窗体的开头并链接到呈现该窗体的 *** 作方法。
CheckBox * - 呈现复选框。
DropDownList * - 呈现下拉列表。
Hidden - 在窗体中嵌入未呈现的信息以供用户查看。
ListBox * - 呈现列表框。
Password - 呈现用于输入密码的文本框。
RadioButton * - 呈现单选按钮。
TextArea - 呈现文本区域(多行文本框)。
TextBox * - 呈现文本框
1.ActionLink
@Html.ActionLink("这是一个连接", "Index", "Home")
带有QueryString的写法
@Html.ActionLink("这是一个连接", "Index", "Home", new { page=1 },null)
@Html.ActionLink("这是一个连接", "Index", new { page=1 })
有其它Html属性的写法
@Html.ActionLink("这是一个连接", "Index", "Home", new { id="link1" })
@Html.ActionLink("这是一个连接", "Index",null, new { id="link1" })
QueryString与Html属性同时存在
@Html.ActionLink("这是一个连接", "Index", "Home", new { page = 1 }, new { id = "link1" })
@Html.ActionLink("这是一个连接", "Index" , new { page = 1 }, new { id = "link1" })
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)