MessageBox工具类是在.Net中使用的后台弹出层,类似C#里面Winform
MessageBox.Show(this, "弹出内容!");
MessageBox.ShowAndRedirect(this, "操作成功,将跳转到:https://www.zhengdecai.com/!", "https://www.zhengdecai.com/");
MessageBox.ResponseScript(this, "alert('弹出内容')");
MessageBox工具类是在.Net中使用的后台弹出层,类似C#里面Winform
MessageBox.Show(this, "弹出内容!");
MessageBox.ShowAndRedirect(this, "操作成功,将跳转到:https://www.zhengdecai.com/!", "https://www.zhengdecai.com/");
MessageBox.ResponseScript(this, "alert('弹出内容')");
很多网站上有留言功能,都需要对留言时间进行处理,处理成“刚刚、5分钟前、1个小时前,几天前,几个月前”这种的时间格式,通过JS方法就可以实现了,方法如下:
/**
* 返回将日期转换为时间描述
*
* @param date
* @return
*/
function getDateDiff(dateTimeStamp) {
var now = new Date().getTime();
$(".pick").live("click", function(){
//JS、JQuery需要实现代码
});
使用live这种方式是JQuery1.9.1以前的的版本,JQuery1.9.1以后的需要使用bind才可以,开始在使用过程中又发现,在用JS或JQuery加载出来的HTML
$('.pick').bind('click',function(event){
jQuery1.9.1针对checkbox的调整:
在jquery 1.8.x中的版本,我们对于checkbox的选中与不选中操作如下:
判断是否选中
安装Android Studio后,运行模拟器出现错误:
emulator: ERROR: x86 emulation currently requires hardware acceleration!Please ensure Intel HAXM is properly installed and usable. CPU acceleration status: HAX kernel module is not installed!
说明: 在编译向该请求提供服务所需资源的过程中出现错误。请检查下列特定错误详细信息并适当地修改源代码。
编译器错误消息: CS0016: 未能写入输出文件“c:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\root\037ce3d1\c4f93318\App_Web_installstep3.aspx.c29b009d.qgdt9mue.dll”--“拒绝访问。 ”
public class MatchHelper
{
/// <summary>
/// 正则匹配结果集中的第一个匹配项
/// </summary>
/// <param name="regularString">进行匹配的字符串集</param>
Android开发学习
Android开发中,需要读取手机中的通讯录。
/// <summary>
/// Js操作类
/// </summary>
public class JsHelper
{
#region 页面JS操作
/// <summary>
/// 弹出信息,并跳转指定页面。
/// <summary>
/// Html常用帮助类
/// </summary>
public class HtmlHelper
{
#region 获取页面源代码
/// <summary>
/// 获取网页源代码
/// <summary>
/// 字符串编码帮助类
/// </summary>
public class EncodingHelper
{
/// <summary>
/// 字符串编码转换
/// </summary>
/// <param name="srcEncoding">原编码</param>
/// <param name="dstEncoding">目标编码</param>
/// <param name="srcStr">原字符串</param>
/// <returns>字符串</returns>
前端页面代码:
<div> <asp:Button ID="sBtn6" runat="server" OnClick="sBtn6_Click" Text="ZIP压缩" /> <asp:Button ID="sBtn7" runat="server" OnClick="sBtn7_Click" Text="ZIP解压缩" /></div>
使用C#实例:
前端页面代码:
<input id="fileUpload" type="file" runat="server" visible="false" /> <asp:FileUpload ID="FileUpload1" runat="server" /> <asp:Button ID="sBtn1" runat="server" OnClick="sBtn1_Click" Text="FTP上传" /> <asp:Button ID="sBtn2" runat="server" OnClick="sBtn2_Click" Text="FTP下载" /> <asp:Button ID="sBtn3" runat="server" OnClick="sBtn3_Click" Text="FTP删除" /> <asp:Button ID="sBtn4" runat="server" OnClick="sBtn4_Click" Text="FTP文件读取" /> <asp:Button ID="sBtn5" runat="server" OnClick="sBtn5_Click" Text="FTP操作" />
使用C#实例:
前端页面代码:
<input id="fileUpload" type="file" runat="server" visible="false" /> <asp:FileUpload ID="FileUpload1" runat="server" /> <asp:Button ID="sBtn" runat="server" OnClick="sBtn_Click" Text="上传" Visible="false" />
使用C#实例:
使用实例:
private string urlPath = "";
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
urlPath = Server.MapPath("~/file/");
fileInfo();
}
}
/// <summary>
/// 文件操作
/// </summary>