JS重置按钮脚本,支持重置ASP.NET控件
开发中经常遇到要重置控件值得操作,下面写了常用HTML控件的重置方法。不完整的,大家可以扩充
function ResetControl() {
var v = document.forms[0].elements;
for (var i = 0; i < v.length; i++) {
if (v[i].type == "text") {
v[i].value = "";
} else if (v[i].type == "select-one") {
v[i].options[0].selected = true;
}
}
}
相关文档:
///C#中的媒体播放类
using System;
namespace ConfigTools
{
/// <summary>
/// PlayClass 的摘要说明。
///原作CSDN,经本人稍加修改
/// </summary>
public class PlayClass
{
public PlayClass()
{
......
System.Drawing.Image imgPhoto = System.Drawing.Image.fromFile("图片路径名");
int sourceWidth = imgPhoto.Width; //图片宽度
int sourceHeight = imgPhoto.Height; //图片高度
控件名.PostedFile.ContentLength &n ......